Q13
What is the result of the expression 5 % 3 in C?
A.
2
AnswerB.
2.5
C.
1
D.
1.67
Answer: Option A
Solution
Answer: Option A
Solution:
In C, the % (modulo) operator is used to calculate the remainder when one number is divided by another. In the expression 5 % 3, it calculates the remainder of dividing 5 by 3, which is 2.