memicmp( ) function: compare two string buffers.
#include <stdio.h>
#include <string.h>
char buf1[40],buf2[40];
int main( )
{
strcpy(buf1,"this is a test");
strcpy(buf2,"this is a test");
/* 0 - identical strings except for case */
/* x - any integer, means not identical */
printf("%d\n",memicmp(buf1,buf2,40));
/* returns a nonzero value */
return (0);
}
Related examples in the same category