#include <strings.h>
int bcmp(const void *s1, const void *s2, size_t n);
#include <stdio.h>
#include <string.h>
int main()
{
char buf1[] = "hello world";
char buf2[] = "hello linux";
if (!bcmp(buf1, buf2, 5))
printf ("equal\n");
if (bcmp(buf1, buf2, 8))
printf ("not equal\n");
return 0;
}
./bcmp
equal
not equal
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |