Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    int num = 0x20 + 020 + 20;
    cout << sizeof(num)<<'\n';
    return 0;
}

A. 2

B. 4

C. Depends on compiler

D. Garbage

Answer: Option C


Join The Discussion

Related Questions on Variables and Data Types in C plus plus