Consider the following code:

Explanation:The value of the variable c will be 0. The modulus (%) operator is used to find out the remainder after a division has been completed. This can be used with integers and floating point numbers.

The following example will demonstrate the use of the modulus operator: