+ 1

what is prefix and postfix ?

Difference b/w x++ & ++x

21st Jul 2016, 4:38 PM
Roman
Roman - avatar
3 Respostas
+ 2
prefix first increases the value of x by 1 then puts it as the value of x. and postfix first puts the value of x in the statements then increases it by 1.
23rd Jul 2016, 3:16 PM
Akshath Dubey
Akshath Dubey - avatar
0
its like preworkout & postworkout pre= ++x post means after the x its x++
27th Jul 2016, 5:57 AM
Manish Pant
Manish Pant - avatar
- 1
x++: access x then increase it ++x: increase x then access it
22nd Jul 2016, 8:51 AM
Tobias B.
Tobias B. - avatar