CPP MCQ
What is the general syntax for accessing the namespace variable?
A)
namespace,operator
B)
namespace#operator
C)
namespace::operator
D)
namespace$operator

Correct Answer : Option (C) :   namespace::operator

Explanation :

To access variables from namespace we use following syntax :

namespace :: variable;

General syntax :

namespace X{ int a;}
cout<<X::a;