cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
decrementing value question
decrementing value question
Jul 8, 2017 at 7:29pm UTC
ahswong
(32)
I ran the code below and x returns 6. I had my answer as 5 but I cant wrap my head around as to why the answer is 6. Can someone please explain to me what I am missing?
1
2
3
4
5
6
int
number = 6;
int
x = 0; x = number--; cout << x << endl;
Jul 8, 2017 at 7:36pm UTC
Enoizat
(1343)
http://www.cplusplus.com/forum/beginner/189811/
Topic archived. No new replies allowed.