stricmp() function (case in-sensitive compare) in C.

 

01  #include<stdio.h>
02 #include<string.h>
03
04 int main()
05 {
06 char str1[20] = "fantastic";
07 char str2[20] = "FANTASTIC";
08 int i;
09
10 i=strcmpi(str1,str2);
11 if(i==0)
12 {
13 printf("Strings are equal");
14 }
15 else
16 {
17 printf("Strings are not equal");
18 }
19 return 0;
20 }
 
 OUTPUT :

Strings are equal

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.