This
Code:
for(initialization; condition; increment) { /* ... */ }
is the same as
Code:
initialization;
while(condition) {
/* ... */
increment;
}
or
Code:
initialization;
value = condition;
while(value) {
/* ... */
increment;
value = condition;
}
It follows that this
Code:
for(; *s1=*s2=*s3; s1++, s2++, s3++);
is the same as
Code:
while(*s1=*s2=*s3) {
s1++, s2++, s3++;
}
or
Code:
value = *s1=*s2=*s3;
while(value) {
s1 ++;
s2 ++;
s3 ++;
value = *s1=*s2=*s3;
}
Oh, and this
Code:
while(*s1 != '\0' ) s1++;
is the same as
Code:
value = (*s1 != '\0');
while(value) {
s1 ++;
value = (*s1 != '\0');
}
Does that help answer your question?
[edit] Hint: loops like this
Code:
while(*s1 != '\0' ) s1++;
just increment s1 until s1 is pointing at the NULL terminator. Thus, after the first two lines of func(), s1 and s2 have both been incremented to point at their NULL terminators. [/edit]