Important MCQ

Which operator increases a value by 1?

Q.Which operator increases a value by 1?

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