cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
i++ & ++i
i++ & ++i
Dec 13, 2014 at 10:15am UTC
Xhobi
(15)
Can any one tell me difference between i++ and ++i.
As i know i++ stands for i=i+1 but what is ++i?
Dec 13, 2014 at 10:21am UTC
minomic
(226)
You can read here:
http://www.hotscripts.com/forums/c-c/57931-c-tip-what-difference-between-postfix-prefix-operators.html
With prefix increment (++i) you increment BEFORE taking the value. With postfix it is the opposite.
Topic archived. No new replies allowed.