Q. Which operator increments a variable by 1?

A
++
B
+= 1
C
--
D
-= 1
Solution:

+= 1 increments a variable, e.g., x += 1 increases x by 1.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!