1.

What is the general syntax for accessing the namespace variable?(a) namespace::operator(b) namespace,operator(c) namespace#operator(d) namespace$operatorThis question was addressed to me during an interview for a job.My question is taken from Namespaces in division Functions, Namespaces & Exceptions in C++ of C++

Answer»

Correct choice is (a) namespace::operator

Easiest explanation - To access VARIABLES from namespace we use following syntax.

namespace :: VARIABLE;

General syntax:

namespace X{ inta;}

cout<



Discussion

No Comment Found

Related InterviewSolutions