Interview Questions on Namespaces in C++ : (6)
Question: 1
(A) :?
(B) ::
(C) ->
(D) .
Compiler
Level: Practitioner Category: namespace
[Posted by: | ]
Question: 2
(A) namespace::a
(B) namesspace.a
(C) namespace->a
(D) namespace:a
Compiler
Level: Practitioner Category: namespace
[Posted by: | ]
Question: 3
(A) Yes
(B) No
Compiler
Level: Beginner Category: namespace
[Posted by: | ]
Question: 4
(A) Before all #include
(B) After #include<iostream>
(C) In middle of #includes
(D) After all #inludes
Compiler
Level: Beginner Category: namespace
[Posted by: | ]
Question: 5
(A) Using the entire namespace, using only single name from namespace
(B) There is no difference
(C) We can't use only cout from std namespace
Compiler
Level: Beginner Category: namespace
[Posted by: | ]
Question: 6
(A) Runtime Error
(B) Compilation Erro
(C) Nothing is printed
(D) CppBuzz.com
Compiler
Level: Beginner Category: namespace
[Posted by: | ]
C++ Online Test
Compile C++ code here
Browse C++ Categories
Loops Conditional Functions Operators Structure Enum Data Types Inheritance Pointers Classes & Objects Vtable Type Casting New & Delete Namespaces Virtual Functions Abstract Class STL Singleton Class Exceptions C++11 C++17 C++20 Time & Space Complexity othersSwitch to C Questions