Google News
logo
CPP - Quiz(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 :   namespace::operator


Explanation :

To access variables from namespace we use following syntax :

namespace :: variable;

General syntax :

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

Advertisement