Q. What is the output of the following code in C++?
int a = 10;
int b = 3;
cout << a % b;
β
Correct Answer: (B)
1
Explanation: The '%' operator returns the remainder of the division. So, 10 % 3 = 1.