What is the value of y? int y = 19 % 4;
B
Correct answer
Explanation
The modulo operator (%) returns the remainder of integer division. When 19 is divided by 4, the quotient is 4 and the remainder is 3 (since 19 = 4*4 + 3). Therefore 19 % 4 equals 3. The result is always an integer when both operands are integers.