?
What is the result of the expression 8 % 4 in C?
Answer & Solution
Correct Answer:
Option
A
In C, the % (modulo) operator is used to calculate the remainder when one number is divided by another. In the expression 8 % 4, it calculates the remainder of dividing 8 by 4, which is 0.
Option B (4) is incorrect because it doesn't represent the remainder of the division.
Option C (2) is incorrect because it also doesn't represent the remainder; it represents half of the dividend.
Option D (8) is incorrect because it's the dividend itself, not the remainder of the division.
Option B (4) is incorrect because it doesn't represent the remainder of the division.
Option C (2) is incorrect because it also doesn't represent the remainder; it represents half of the dividend.
Option D (8) is incorrect because it's the dividend itself, not the remainder of the division.
Join the Discussion
Login to post a comment or share your explanation.
Login