Answers for "compare 2 string in c"

C
1

string compare c

int result=strcmp(str1,str2);
// 0  if strings are equal
// >0  if the first non-matching character in str1 is greater (in ASCII) than that of str2.
// <0  if the first non-matching character in str1 is lower (in ASCII) than that of str2.
Posted by: Guest on November-17-2021
0

compare c Strings

char str1[] = "Look Here";
char str2[] = "Look Here";

int i = strcmp(str1, str2);
Posted by: Guest on June-22-2021

Code answers related to "C"

Browse Popular Code Answers by Language