Home > Back-end >  Expected primary - expression before '/' token how to solve?
Expected primary - expression before '/' token how to solve?

Time:09-18

This is my program, can you tell me what's wrong?
#include
Void strcat_stu (char [41] s1 and s2 [20] of char) {
int i,j;
For (I=0;; I++)
If (s1=/0)
break;
for(j=0; S2!=/0; J++) {
S1=s2 [I] [j];
i++;
}
}
The main () {
Char s1 [41];
Char s2 [20].
The scanf (" % s ", s1);
The scanf (" % s ", s2);
Strcat_stu (s1, s2);
Printf (" % s ", s1);
}

CodePudding user response:



#include
Void strcat_stu (char [41] s1 and s2 [20] of char) {
int i,j;
For (I=0;; I++)
If (s1==0)
break;
for(j=0; S2!=0; J++) {
S1=s2 [I] [j];
i++;
}
}
Int main () {
Char s1 [41];
Char s2 [20].
The scanf (" % s ", s1);
The scanf (" % s ", s2);
Strcat_stu (s1, s2);
Printf (" % s ", s1);
}

CodePudding user response:

"=/" what meaning be?

CodePudding user response:

Do you want to write a '\ 0' terminator?


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- a delicate small tail -- -- --
https://bbs.gnsoft.ltd
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • Related