In a C program i was trying the below operations(Just to check the behavior )
x = 5 % (-3);
y = (-5) % (3);
z = (-5) % (-3);
printf(\"%d ,%d ,%d\", x, y
Modulus operator gives the remainder. Modulus operator in c usually takes the sign of the numerator
Also modulus(remainder) operator can only be used with integer type and cannot be used with floating point.