Thursday, May 15, 2008

c function ,strcmp and stricmp

strcmp

input: string S1,string S1

output: 0:if S1==S1 , 1 :otherwise

stricmp same but stricmp let "Abc" identity to "abc"

e.g.

printf("%d\n",strcmp("abc", "abc")); 0:identity

printf("%d\n",strcmp("abc", "Abc")); 1:distinct

printf("%d\n",stricmp("abc", "abc")); 0:identity

printf("%d\n",stricmp("abc", "Abc")); 0:identity

0 Comments:

Post a Comment

<< Home