Choose the correct answer after considering the following statements: I. A using namespace directive should never be in a .cpp file because that .cpp file could be included in another source file. II. A using namespace directive should always be used in a .h files. III. Namespaces help differentiate functions, variables, and types with the same name. Group of answer choices a. Only III are true b. Only II and III are true c. Only I is true d. Only I and III is true e. Only II is true

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.1: I/o File Stream Objects And Functions
Problem 10E
icon
Related questions
Question

Choose the correct answer after considering the following statements:

I. A using namespace directive should never be in a .cpp file because that .cpp file could be included in another source file.

II. A using namespace directive should always be used in a .h files.

III. Namespaces help differentiate functions, variables, and types with the same name.

Group of answer choices
a. Only III are true
b. Only II and III are true
c. Only I is true
d. Only I and III is true
e. Only II is true
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Header Files
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,