# define number 3
Int main (void)
{int I;
Char s [number] [128];
for(i=0; i
The scanf (" % s ", s [I]);
If (' s [I] [128] '==' $$$$$')
break;
}
for(i=0; i
}
return 0;
}
CodePudding user response:
Use STRCMP to compare strings, do not use the==CodePudding user response:
The comparison of string class assignment has its own exclusive function, can't use the set of integers, encapsulates the c + + to use, look at the string. In h strcpy, STRCMP, strcat these functionsCodePudding user response:
If (STRCMP (s [I] [128], "$$$$$")==0)//want to use double quotation marks hereCodePudding user response:
# include
#include
# define number 3
Int main (void)
{
int i;
Char s [number] [128];
for(i=0; i{printf (" s [% d] : ", I);
The scanf (" % s ", s [I]);
//if (' s [I] [128] '==' $$$$$')
If (STRCMP (s [I], "$$$$$")==0)
break;
}
for(i=0; i{
Printf (" s [% d]=\ "% s \ " n ", I, s [I]);
}
return 0;
}
For your reference ~
CodePudding user response:
Single-byte can't compare with stringCodePudding user response:
Thank you resolved when the answer thank you