What is the result of the expression 8 / 3 in C?
A. 2
B. 2.67
C. 3
D. 3.5
Answer: Option A
Solution(By Examveda Team)
In C, when you perform integer division, as in the expression 8 / 3, it results in the quotient without any decimal places. Therefore, the result is 2.Option B (2.67) is incorrect as it would be the result of floating-point division.
Option C (3) is incorrect because it would be the result of rounding up in floating-point division.
Option D (3.5) is incorrect because it would be the result of floating-point division.
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion