Which of the following operator takes only integer operands?
A. +
B. *
C. /
D. %
E. None of these
Answer: Option D
Solution(By Examveda Team)
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.
Join The Discussion
Comments ( 6 )
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
Can you explain it
because modulus doesn't take real or floating point numbers as operands
How ??
sir could you please explain it
how it takes?
yes