Practice mode C Language

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.