Vidyalelo
C++ Programming · Q173

Functions and Procedures in C++

Programming · C++ Programming · question 173

Q173

What will be the output of the following C++ code? #include #include using namespace std; namespace A int var = 10; namespace B int var = 5; int main() using namespace B; cout<<var;

A.
5
Answer
B.
10
C.
Error
D.
Wrong use of namespace

Answer: Option A

Solution

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