← Back to Question List
C++ Code Walkthrough #49
Comparing Signed and Unsigned Integers
📄 Code
Read carefully — what does this print?1#include <iostream>2using namespace std;34int main() {5 unsigned int u = 3;6 int i = -1;7 if (i < u)8 cout << "less" << endl;9 else10 cout << "not less" << endl;11 cout << (i < u) << endl;12 return 0;13}