strncmp - Lexicographically compares not more than count characters in C

  #include <stdio.h>
  #include <string.h>
  #include <stdlib.h>

  int main(int argc, char *argv[])
  {

    if(!strncmp("asdfasdfasdfasdf", "asdfasdffdsaasdf", 8))
      printf("The strings are the same.\n");

    return 0;
  }




Output:
The strings are the same.