-
What is the output of this program?
#include <iostream>
using namespace std;
int main ()
{
int num;
num = 45;
cout << hex << num << endl;
return 0;
}
-
- 45
- 2d
- Compilation Error
- Runtime Error
- None of these
Correct Option: B
In this program, We are printing the hexadecimal value of the given decimal number by using hex function.