0

How it output equal

String comparison

29th Mar 2020, 10:12 AM
Ajith
Ajith - avatar
4 Antworten
0
char *str="Solo"; char *str1="Learn"; if(strcmp(str,str1)) printf("equal"); else printf ("not equal");
29th Mar 2020, 10:13 AM
Ajith
Ajith - avatar
0
Output is equal
29th Mar 2020, 10:14 AM
Ajith
Ajith - avatar
0
strcmp() returns non-zero value if the strings are not equivalent.
29th Mar 2020, 10:15 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Okie thanks
29th Mar 2020, 10:20 AM
Ajith
Ajith - avatar