Interview Questions

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

C Interview Questions and Answers


(Continued from previous question...)

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.

(Continued on next question...)

Other Interview Questions