A

Admin • 828.03K Points
Coach

Q. Choose a right statement.

Code:
float a = 5/2;
float b = 5/2.0;
float c = 5.0/2;
float d = 5.0/2.0;
  • (A) a=2.5, b=2.5, c=2.5, d=2.5
  • (B) a=2, b=2.5, c=2.5, d=2.5
  • (C) a=2.0, b=2.5, c=2.5, d=2.5
  • (D) a=2.0, b=2.0, c=2.0, d=2.0
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.