A

Admin • 36.96K Points
Coach

Q. What will be the output of the following code?

int a = 10, b = 3;
cout << a % b;

  • (A) 1
  • (B) 3
  • (C) 0
  • (D) 10
  • Correct Answer - Option(A)
  • Views: 52
  • Filed under category C++

Explanation by: Admin
The modulus operator (%) returns the remainder of division. 10 % 3 results in 1.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics