GeekInterview.com
Series: Subject: Topic:
Question: 746 of 828

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.
Asked by: Interview Candidate | Asked on: Mar 6th, 2005
Showing Answers 1 - 1 of 1 Answers
rajesh

Answered On : Jun 25th, 2006

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

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.