What will be printed out as a result of the following program's execution?
#include <iostream>
using namespace std;

int main() {
  cout << 1 << hex << 16;
  return 0;
hex changes the base used for integer I/O to hexadecimal.
Other available options:
dec - decimal base format.
oct - octal base format.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes