eg:

#include <stdio.h>  
#include <string.h> 
                       
int main(void)         
{                      
    char string[7] = "ABCDEFG";
    char copy[4] = "ABCD";
    int ret;           
                       
    ret = memcmp(string,copy,7);
    printf("the ret is %d\n",ret);
                       
    ret = strcmp(string,copy);
    printf("the ret is %d\n",ret);
    return 0;          
}

显而易见!