What is a modulus operator?
it gives reminder of any division operation
It is an binary arithmetic operator which returns the remainder of division operation. It can used in both floating-point values and integer values.
Use of the modulus operator is given below:
opLeft % opRight
where, opLeft is the left operand and opRight is the right operand. This expression is equivalent to the expression opLeft - ((int) (opLeft / opRight) * opRight)
in c language it is used to determine the remainder of any no by deviding the operator if both of them is not float no.
it gives remainder part of divisoneg. printf("%d",5%2) output 1