CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Pre and Post Increment

C++ code walkthrough · Question 19
mediumOperators

Code

Read carefully. What does this print?
1#include <iostream>
2using namespace std;
3 
4int main() {
5 int a = 5;
6 int b = a++;
7 int c = ++a;
8 cout << a << " " << b << " " << c << endl;
9 return 0;
10}

Your answer