7.21.4.2 The strcmp function

Synopsis

1

#include <string.h>
int strcmp(const char *s1, const char *s2);

Description

2

The strcmp function compares the string pointed to by s1 to the string pointed to by s2.

Returns

3

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