0

What is the difference between Pre increment and post increment?

can anyone explain by using it in arithmetic expressions?

24th Dec 2016, 8:05 PM
Altaf Hussain
Altaf Hussain - avatar
3 Respostas
+ 7
x = 10; return x++/2; //5 x = 9; return ++x/2; //5
24th Dec 2016, 8:13 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
x = 10; return x++; //10 return x; //11 x = 10; return ++x/ //11
24th Dec 2016, 8:09 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
x++/2 ; //what will be the results and effects? ++x/2;
24th Dec 2016, 8:11 PM
Altaf Hussain
Altaf Hussain - avatar