How do I add two strings?
I tried name = \"derp\" + \"herp\";, but I got an error:
name = \"derp\" + \"herp\";
Expression must have integral or enum type
using memcpy
char *str1="hello"; char *str2=" world"; char *str3; str3=(char *) malloc (11 *sizeof(char)); memcpy(str3,str1,5); memcpy(str3+strlen(str1),str2,6); printf("%s + %s = %s",str1,str2,str3); free(str3);