what is the following code doing, particularly in the *strcat1 function???
(1)explain to me the reason for two while loops,
(2)why does the first have just *p2 : no assignments or logical operators??
(3)and why does the second have just ; on a line???
(4)what does ++p2 do as compared to ++(*p2) ??
sorry so many questions, but I figure that in order to have this sink in and for me to get what is going on I need to know what each part of the code is saying/doing.
char *strcat1(char *strDest, char *strSource)
char *p1 = strSource, *p2 = strDest;
while (*p2++ = *p1++)
char s1 = "abc", s2 = "def";
printf("Result is: %s\n", strcat1(s1, s2));