CJCoding With Joseph
← Back to Question List
C++ Code Walkthrough #27

Chained Compound Assignment

easyOperators

📄 Code

Read carefully — what does this print?
1#include <iostream>
2using namespace std;
3int main() {
4 int x = 10;
5 x += 5;
6 x *= 2;
7 x -= 3;
8 cout << x << endl;
9 return 0;
10}

🎯 Your Answer