Sail E0 Webinar
Question

If the two strings are identical, then strcmp() function returns


Options:
A .  -1
B .  1
C .  0
D .  Yes
Answer: Option C

Declaration: strcmp(const char *s1, const char*s2);

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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers