A

Admin • 828.03K Points
Coach

Q. What is the result of the following expression in C++: '5 / 2'?

  • (A) 2.5
  • (B) 2
  • (C) 3
  • (D) Error
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category C++
  • Hashtags:

Explanation by: Admin
In integer division, the fractional part is discarded, so the result of 5 / 2 is 2.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.