#include <string.h>
int strncmp(const char *string1, const char *string2, size_t count);
The strncmp() built-in function compares at most the first count characters of the string pointed to by string1 to the string pointed to by string2.
The string arguments to the function should contain a NULL character (\0) marking the end of the string.
The relation between the strings is determined by the sign of the difference between the values of the leftmost first pair of characters that differ. The values depend on character encoding. This function is not locale sensitive.