Important MCQ

The % operator works only with

Q.The % operator works only with

A) float values
B) characters only as text
C) integers
D) strings
Correct Answer:
Option C
Detailed Explanation:
C) integers is correct. Arithmetic operators include +, -, *, /, %, ++ and --. Integer division produces an integer result; postfix uses the old value before updating, while prefix updates first.