Interview Questions

What's the difference between ++i and i++?

C Interview Questions and Answers


(Continued from previous question...)

What's the difference between ++i and i++?

If your C book doesn't explain, get a better one. Briefly: ++i adds one to the stored value of i and ``returns'' the new, incremented value to the surrounding expression; i++ adds one to i but returns the prior, unincremented value.

(Continued on next question...)

Other Interview Questions