Multiple choice

What is the output of the following C++ code?

#include <iostream> using namespace std; int main() { cout.setf(ios::hex,ios::basefield); cout<<100; return 0; }

  1. 100

  2. 144

  3. 64

  4. 40

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Here we have set basefield flag as hex which will display100 in hex and output is 64. Hence, the given option is correct.