← Quiz: String Handling in C: all 15 questions
Quiz: String Handling in C · Question 3 of 15
strcmp("apple", "apply") returns:
strcmp("apple", "apply") returns:
- A.0
- B.A negative value
- C.A positive value
- D.The length of the common part
Answer & explanation
Correct answer: A negative value
The first difference is 'e' vs 'y'; 'e' is smaller, so the result is negative.
Can you get the rest right without peeking?
Take the timed Quiz: String Handling in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →