CJCoding With Joseph
15per day
← Back to Question List
C++ Code Walkthrough #19

Pre and Post Increment

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