A

Admin • 831K Points
Coach

Q. What will be the result of this code? int x = 10.5;

  • (A) Compile-time error
  • (B) x = 10
  • (C) x = 11
  • (D) Runtime error

Explanation by: Admin
10.5 is a double and cannot be directly assigned to int without casting.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.