
what is the difference between i++ and ++i?

hi friend,
i++ is post increment where ++i is pre-increment.
For example,
i=5;
i++;//i is 5
now i is 6
++i;//i is 7
now i is 7

Hello Friend,
++i will increment the value of i, and then return the incremented value whereas i++ will increment the value of i, but return the pre-incremented value.
Thanks