Syntax | #include <string.h> int memcmp(const void *s1, const void *s2, size_t n); |
Description memcmp()
compares the contents of the first n bytes of the memory areas to which s1 and
s2 point. s1 and s2 are pointers to the memory areas to be compared. n is an integer value that specifies the number of bytes to be compared. | ||
Return val. | Integer value, which may be: | |
< 0 | In the first n bytes, the contents of s1 are lexically smaller than the contents | |
0 | In the first n bytes, the contents of s1 and s2 are of equal lexical size (i.e. | |
> 0 | In the first n bytes, the contents of s1 are lexically larger than the contents | |
Notes | This function is suitable for processing character arrays, which, in contrast to character | |
See also |
|