+ 1
What mean ++a
7 Réponses
+ 9
pre-increment
+ 6
increment by one before any operation on it.
+ 5
Int a = 5
Int b = ++a
It is prefix increament ,The value of a is incremented by 1 then, it returns the value.
//output a=6
+ 2
this is pre-increment .
It increments the value of a and then uses it.
+ 1
int a=1 and b=++a then b=2 and a=2
+ 1
My answer is the same as the rest except I'll tell you about the opposite of prefix. Postfix a++. Postfix returns the current value of a first, then increments a.
Its like reading a word left to right, that's the order a++ and ++a are evaluated.
0
when the operator is placed before the variable (++a) the variable is incremented by 1 before it is used in the expression