difference between x++ and ++x?? precedence of these 2 increment operators? same for x-- and --x

18th Aug 2016, 7:54 PM
Diksha Mehta
Diksha Mehta - avatar
1 Answer
+ 1
lets us understand with ex int x=2,int y; y=x++; //now y=2 int x=2,int y; but if we do y=++x; //now y=3 so ++x do increment before evaluating and x++ evaluates before increment. same is applied for x-- and --x. hope helps.
19th Aug 2016, 3:46 AM
rajat kumar raicha
rajat kumar raicha - avatar