🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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:

  1. A.The first element should come before the second
  2. B.The first element should come after the second
  3. C.The two elements are equal
  4. 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 →