In C, what is the value of the expression 7 / 2 when both operands are of type int?
Correct answer B. 3
Explanation
When both operands are integers, C performs integer division and discards the fractional part, so 7 / 2 gives 3 rather than 3.5.
Answer checked How we write and check questions
Discussion