What is a modulus operator? What are the restrictions of a modulus operator?

A Modulus operator gives the remainder value. The result of x%y is obtained by(x-(x/y)*y). This operator is applied only to integral operands and cannot be applied to float or double.

Showing Answers 1 - 1 of 1 Answers

rajesh

  • Jun 25th, 2006
 

Since the modulus operator produces the remainder it cannot accept float or double values. Usually the remainder should not be negative

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions