C Programming String Multiple choice question

Exercise :: String - General Questions

This section contains a lot of Question with answer and explanation.

2) If the two strings are identical, then strcmp() function returns
A. -1
B. 1
C. Zero (0)
D. Yes

Answer:

Zero (0)

Option:

( C )


Explanation :

The strcmp return an int value that is if s1 < s2 returns a value < 0 if s1 == s2 returns 0 if s1 > s2 returns a value > 0