ExamVeda
Login
Home
Operators and Expressions
?

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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.