ACtE03 · Chapter 3Programming & Applications🏛️ Past Licensure QuestionID: 55df75cb
Which of the following statements about C++ namespaces is INCORRECT?
Which of the following statements about C++ namespaces is INCORRECT?
Multiple Choice Options
- A✓ Correct Option
A namespace supports 'public' and 'private' access specifiers
- B
The 'namespace' keyword is used to declare a namespace block
- C
Namespaces allow logical grouping of related classes and functions
- D
Namespaces help avoid name collisions in large modular programs
Detailed Technical Solution & Explanation
In C++, namespaces do NOT have access specifiers (public, protected, private). Everything declared within a namespace is accessible if the namespace scope is properly qualified or imported. Access specifiers apply only to class and struct definitions.
Option Analysis:
•
Option A (A namespace supports 'public' and 'pr...): Correct (this statement is INCORRECT). Namespaces have no access control specifiers.
•
Option B (The 'namespace' keyword is used to de...): True statement.
•
Option C (Namespaces allow logical grouping of ...): True statement.
•
Option D (Namespaces help avoid name collisions...): True statement.
Reference: Demo2 · Set 2NEC Licensure Syllabus