I don't understand this for function.
WHEN YOU TYPE
Code:
void func(char *s1, char *s2, char *s3){
while(*s1 != '\0' ) s1++;
while(*s2 != '\0' ) s2++;
for(; *s1=*s2=*s3; s1++, s2++, s3++);
}
main() {
char s1[10] = "ABC", s2[10]="DEF";
char s3[10] = "GHI";
func(s1,s2,s3);
printf("%s, %s %s", s1, s2, s3);
}
this code gives ABCGHI, DEFGHI GHI as the result....
how come there is a command assignment in the middle of for function
and why is the result like that? I would be very much appreciated if
you tell me step by step :)