Q. What will be the output of the following code?
int x = 5;
int y = 2;
cout << x % y;
β
Correct Answer: (C)
1
Explanation: The '%' operator calculates the remainder of a division. So, 5 % 2 = 1.