What does the strcmp() function return when the two strings compared are identical ?
Answer: B
Correct answer: 0
strcmp() returns zero for identical strings, a negative value when the first sorts before the second and a positive value otherwise. The common mistake is to treat a zero return as false and so invert the test.
Please log in or register to report this question.