Vidyalelo
C++ Programming · Q103

Functions and Procedures in C++

Programming · C++ Programming · question 103

Q103

How to print the value of the i variable inside namespace B? namespace A int var = 10; namespace B int i = 15;

A.
cout<<A::i;
B.
cout<<B::i;
C.
cout<<A::B::i;
Answer
D.
cout<<i;

Answer: Option C

Solution

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