ProgrammingHard

What is -7 / 4 in C?

  1. A. -2
  2. B. -1.75
  3. C. -3
  4. D. -1

Correct answer: D. -1

C99 division truncates toward zero, so the result is -1 (the exact value is -1.75).

More C Programming questions

Exams that ask this topic