Examveda
Examveda

What is the result of the expression 5 / 2 in C?

A. 2

B. 2.5

C. 2.50

D. 3

Answer: Option A

Solution(By Examveda Team)

In C, when you perform integer division, as in the expression 5 / 2, it results in the quotient without any decimal places. Therefore, the result is 2.

Option B (2.5) is incorrect because it represents the result of floating-point division, not integer division.
Option C (2.50) is incorrect because it also represents a floating-point number, which is not the result of integer division.
Option D (3) is incorrect because it doesn't consider integer division; the correct result is 2.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Comments ( 1 )

  1. Priyanka Patel
    Priyanka Patel :
    7 months ago

    How answer will be 2.5 because it's return only 2

Related Questions on Operators and Expressions