7.21.4.1 The memcmp function

Synopsis

1

#include <string.h>
int memcmp(const void *s1, const void *s2, size_t n);

Description

2

The memcmp function compares the first n characters of the object pointed to by s1 to the first n characters of the object pointed to by s2.[1]

Returns

3

The memcmp function returns an integer greater than, equal to, or less than zero, accordingly as the object pointed to by s1 is greater than, equal to, or less than the object pointed to by s2.

Footnotes