Vidyalelo
C Programming · Q31

Operators and Expressions

Programming · C Programming · question 31

Q31

Which of the following operator takes only integer operands?

A.
+
B.
*
C.
/
D.
%
Answer
E.
None of these

Answer: Option D

Solution

Answer: Option D
Solution:
In C, the modulus operator (%) takes only integer operands. It is used to find the remainder when one integer is divided by another. This operator is specifically designed for integer arithmetic.

Option A (+) represents the addition operator, which can take both integer and floating-point operands.
Option B (*) represents the multiplication operator, which can take both integer and floating-point operands.
Option C (/) represents the division operator, which can take both integer and floating-point operands.
Option E (None of these) is incorrect because % is the operator that specifically takes only integer operands; the other options can take both integer and floating-point operands.