fork(56) download
  1. #include <stdio.h>
  2. #include <memory.h>
  3.  
  4. int main(int argc, char** argv) {
  5.  
  6. char* str1;
  7. char* str2;
  8. str1 = "sssss";
  9. str2 = "kkkk";
  10. char * str3 = (char *) malloc(1 +sizeof(char*) * (strlen(str1)+ strlen(str2)));
  11. strcpy(str3, str1);
  12. strcat(str3, str2);
  13. printf("%s", str3);
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 2424KB
stdin
Standard input is empty
stdout
ssssskkkk