← Quiz: Function Pointers in C: all 15 questions
Quiz: Function Pointers in C · Question 4 of 15
A qsort comparator should return a negative value when:
A qsort comparator should return a negative value when:
- A.The first element should come before the second
- B.The first element should come after the second
- C.The two elements are equal
- D.There is an error
Answer & explanation
Correct answer: The first element should come before the second
Negative = first goes first, 0 = equal, positive = first goes after.
Can you get the rest right without peeking?
Take the timed Quiz: Function Pointers in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →