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

Do-While Loop Behavior

easyLoops

📄 Code

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

🎯 Your Answer