•Comparing
strings
–int
strcmp( const char *s1, const char *s2 )
•Compares
character by character
•Returns
–Zero
if strings equal
–Negative
value if first string less than second string
–Positive
value if first string greater than second string
–int strncmp( const char *s1,
– const char *s2, int n )
•Compares
up to specified number of characters
•Stops
comparing if reaches null character in one of arguments