Why doesn the code “char *answer; gets(answer);” work?
The pointer variable answer has not been set to point to any valid storage. The simplest way to correct this fragment is to use a local array, instead of a pointer. 7.2: I can’t get strcat() to work. I tried “char *s3 = strcat(s1, s2);” but I got strange results. A: Again, the main problem here is that space for the concatenated result is not properly allocated. 7.