Advertisements
Advertisements
Question
If int a = 27, b = 4, c = O; then c = a%b; results in 3.
Options
True
False
MCQ
True or False
Solution
This statement is True.
Explanation:
The % operator is the modulus (remainder) operator, producing the remainder of a division by b.
- When 27 is divided by 4, the quotient is 6, with a leftover of 3.
- So, c = 27% 4 gives c = 3.
shaalaa.com
Is there an error in this question or solution?