Answer the following questions true (T) or false (F)

1. If I have already written the #include header, I can overload operator<< for class A as follows:
std::ostream& operator<< (std::ostream& out,const A& obj);

2. You have a helping function that is not a member of your class. You want your class member functions to be able to see it and use it but no other file in your program may see it. You can place it in an unnamed namespace to make it invisible from outside the file.


1. True
Explanation: You can qualify any name in a namespace using the namespace name and the scope resolution operator.
2. True
Explanation: Unnamed namespaces make a collection of names available to any function or class member function in the file, but not to any function outside the file.

Computer Science & Information Technology

You might also like to view...

COGNITIVE ASSESSMENT You are a game designer, what is your job description?

A. designs games and translates designs into a program or app using an appropriate application development language B. integrates and expands the company's initiatives for mobile users C. develops and directs an organization's mobile strategy, including marketing and app development D. develops and maintains programs and tools designed to provide security to a network

Computer Science & Information Technology

Currently, there are no antivirus programs for mobile devices.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What information is required as part of an interactive ESXi 6.x installation?

A. Keyboard layout B. IP Address C. Root password D. DNS information

Computer Science & Information Technology

Explore the emerging area of wearable computing, such as the Apple Watch and Android Wear, and document the impact of these devices on user interface design.

What will be an ideal response?

Computer Science & Information Technology