ExamVeda
Login
Home
Operators and Expressions
?

What is the result of the expression 2.5 + 2 in C?

Answer & Solution
Correct Answer: Option A
In C, when you add two floating-point numbers, as in the expression 2.5 + 2, the result is a floating-point number. Therefore, the result is 4.5.

Option B (4) is incorrect because it represents an integer result, but the expression involves floating-point numbers.
Option C (2.7) is incorrect; it's not the result of the given expression.
Option D (2) is incorrect for the same reason as Option B; it represents an integer result, not a floating-point result.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.