Q. What is the output of the following C++ code?
Code:#include<iostream>
using namespace std;
int a = 55;
void fun()
{
int a = 20;
{
int a = 10;
cout << ::a << endl;
}
}
int main()
{
fun();
return 0;
}
β
Correct Answer: (C)
55