Explain modulo operator for c programming with an example
Answers
Answered by
1
It is called Modulus operator and it returns the remainder. Represented with %.
The difference between division and modulus operator is division returns Quotient of two numbers, whereas Modulus operator returns the remainder.
Ex : Division of 9/4 = 2
Modulus division of 9/4 = 1
Hope this helps!
The difference between division and modulus operator is division returns Quotient of two numbers, whereas Modulus operator returns the remainder.
Ex : Division of 9/4 = 2
Modulus division of 9/4 = 1
Hope this helps!
Similar questions