Once you attempt the question then PrepInsta explanation will be displayed.
The C library function strcmp() compares two strings with each other and return the value accordingly.
int strcmp(const char *str1, const char *str2)
Comparison happens between first string (str1) with second string (str2).
By comparing two strings, the values return by the function strcmp() are,
- If, str1 is less than str2 then Return value < 0
- If, str2 is less than str1 then Return value > 0
- If, str1 is equal to str2 then Return value = 0