Include: |
<string.h> |
Syntax: |
int strcmp( char *string1, char *string2 );
|
Returns: |
a negative value if is less than ,
0 if is equal to , or a positive value if
is greater than . |
Description: |
The strcmp function compares and
and returns a value indicating their relationship, as follows: Value
Meaning < 0 is less than = 0 is identical
to > 0 is greater than The strcmp function
operates on null-terminated strings. The arguments to this
function are expected to contain a null character (\0) marking the
end of the string. |
|