What is the general syntax for accessing the namespace variable?

a) namespace::operator
b) namespace,operator
c) namespace#operator
d) namespace$operator

1 thought on “What is the general syntax for accessing the namespace variable?”

  1. a
    Explanation: To access variables from namespace we use following syntax.
    namespace :: variable;
    General syntax:
    namespace X{ int a;}
    cout<<X::a;

Leave a Comment