What is the result of the expression 5 % 3 in C?
A. 2
B. 2.5
C. 1
D. 1.67
Answer: Option A
Solution(By Examveda Team)
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.Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion