Vidyalelo
C++ Programming · Q172

Functions and Procedures in C++

Programming · C++ Programming · question 172

Q172

What will be the output of the following C++ code? #include using namespace std; namespace Box1 int a = 4; namespace Box2 int a = 13; int main () int a = 16; Box1::a; Box2::a; cout << a; return 0;

A.
4
B.
13
C.
16
Answer
D.
compile time error

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board