Examveda
Examveda

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.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions