#include <stdlib.h> #include <stdio.h> #define STR_SIZE1 1024 #define STR_SIZE2 1024 char StrCat(char *f,char *s) { char *ptr1,*ptr2; char array1,array2; ptr1 = &f; array1 = *f; ptr2 = &s; array2 = *s; return array1,array2; } int main() { char first[STR_SIZE1]; char second[STR_SIZE2]; printf("Please enter first string: "); scanf("%s", first); printf("Please enter second string: "); scanf("%s", second); printf("%s%s",StrCat(second,first)); return 0; } The code is compiled, but after entering the lines, the program crashes. Tell me, what could be the error and what should be corrected?
printf("%s%s",second,first);and everything - pavelStrcat()codeStrcat()... - Harry