Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int num = 0x20 + 020 + 20;
6.
cout
What is the output of the following program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int num = 0x20 + 020 + 20;
6.
cout
Answer: Option C
Was this answer helpful ?
The sum of three numbers are belongs to different number systems, so the result is typecasted into integer.
Output:
$ g++ size.cpp
$ a.out
4
Was this answer helpful ?
More Questions on This Topic :
Question 1.
Identify the incorrect option.
....
Submit Solution