Compare two String function in C Program
//compare string #include<stdio.h> #include<conio.h> #include<string.h> main() { char str1[10],str2[10]; printf("input first string:"); scanf("%s",str1); printf("input second string:"); scanf("%s",str2); if(strcmp(str1,str2)==0) { printf("Both %s and %s are same",str1,str2); } else if (strcmp(str1,str2)>0) { …
Compare two String function in C Program Read More