CPP Namespace MCQ

  1. Home
  2. Tutorials
  3. Cpp
  4. Namespace
  5. Multiple Choice Question

(1) Which of the following parenthesis are used to define scope of namespace while using namespace directive?

A) Square
B) Curly
C) Small
D) Angle

(2) An alternative or short nane of existing namespace is called.

A) alias
B) duplicate
C) namespace2
D) other_namespace

(3) How many methods to access namespace elements?

A) 1
B) 2
C) 5
D) Multiple

(4) Which of the following is standard namespace identifier?

A) standard
B) common
C) cin
D) std

(5) Which directive is used for namespace in C++?

A) accessing namespace
B) including namespace
C) using namespace
D) with namespace

(6) Which of the following can be defined in namespace?

A) Variables
B) Labels
C) Functions
D) All C++ valid statements

(7) Which of following operator is used to access c++ namespace elements?

A) . (dot)
B) :: (scope resolution)
C) & (ampersand)
D) # (hash)
Login to TRACK of Comments.