Which symbol is used for the 'modulo' operation in C?
A. %
B. /
C. *
D. ^
Answer: Option A
Solution (By Examveda Team)
The symbol used for the 'modulo' operation in C is %. The '%' symbol calculates the remainder when one number is divided by another and is commonly used for tasks such as checking for even or odd numbers and cycling through a range of values.So, the correct answer is:
Option A:
%
Here's an example of using the modulo operator in C:
int remainder = 10 % 3;
In this example, the value of 'remainder' will be 1 because 10 divided by 3 is 3 with a remainder of 1.
Join The Discussion