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...
Type: Posts; User: Dorky King
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...
Now I've got another problem...
at the end of for statement, pointer s1, s2, s3are all pointing to the '\0' character of each
string.
when you come back to main and print each string why does it...
you guys are awesome... thank you so much!!!!
opps.... the result is ABCGHI, DEFGHI GHI... I'm sorry mistake
come on experts!!! I'm desperate...
WHEN YOU TYPE
void func(char *s1, char *s2, char *s3){
while(*s1 != '\0' ) s1++;
while(*s2 != '\0' ) s2++;
for(; *s1=*s2=*s3; s1++, s2++, s3++);
}