How do you increment a variable by 1?

How do you increment a variable by 1?
Answer
A program can increment by 1 the value of a variable called c using
the increment operator, ++, rather than the expression c=c+1 or c+=1. An increment or decrement operator that is prefixed to (placed before) a variable is referred to as the prefix increment or prefix decrement operator, respectively.
 

Tìm kiếm

Back
Top