C – Strcmpi

C – Strcmpi 2017-07-19T23:24:53+00:00

Strcmpi :

Syntax :
#include<string.h>
int strcmpi( char *str1, char *str2 );

strcmpi(str1,str2) compares str1 and str2 lexicographically without regards to case .Returns a negative value if str1<str2; 0 if str1 and str2 are identical; and positive value if str1>str2.

C – STRCMPI EXAMPLE PROGRAM :

Output :

Enter first string

I  Love The World

Enter second string

i love the world

str1 : I Love The World

str2 : i love the world

str1 and str2 are identical

Prev Next