VARIABLLE AND DATA TYPE | C++ FOUNDATION Question 5

Last Updated :
Discuss
Comments
#include<iostream>
using namespace std;
int x = 1;
void fun()
{
int x = 2;
{
int x = 3;
cout << ::x << endl;
}
}
int main()
{
fun();
return 0;
}

0

1

2

3

Share your thoughts in the comments