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

Booleans Printed as Integers

easyOperators

📄 Code

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

🎯 Your Answer