Vidyalelo
C Programming · Q5

C Fundamentals

Programming · C Programming · question 5

Q5

Which symbol is used for the 'modulo' operation in C?

A.
%
Answer
B.
/
C.
*
D.
^

Answer: Option A

Solution

Answer: Option A
Solution:
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.