memcmp()

Syntax
  #include <string.h>

  
  void *memcmp(const void *p,

  
               const void *q,

  
               size_t n);

  
Description

memcmp() compares the first n bytes of the two memory areas pointed to by p and q.

Return

A positive integer, if p is considered greater than q; a negative integer if p is considered smaller than q or zero if the two memory areas are equal.

See also

memchr(),

strcmp(), and

strncmp()