Exam 12: Separate Compilation and Namespaces
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
If you have a class defined in separate files, and change the way a class is defined, which files need to be re-compiled?
(Multiple Choice)
4.8/5
(35)
The file that contains the definition of the class is called the _____________
(Short Answer)
4.7/5
(39)
If you have a class defined in separate files, and change the way a member function is defined the body of the function), which files need to be re-compiled?
(Multiple Choice)
4.9/5
(44)
If you want to only use cin and cout but no other names) from the std namespace, you would
(Multiple Choice)
4.9/5
(38)
In a program with no user defined namespaces, all names are defined in the global namespace
(True/False)
4.8/5
(47)
Given the following code, what namespace does display3 belong to?
namespace ns1
{
void print);
void display1){};
}
namespace ns2
{
void print);
void display2){};
}
void display3);
int main)
{
using namespace ns1;
using namespace ns2;
display1);
display2);
return 0;
}
void display3)
{
}
(Short Answer)
4.9/5
(31)
Given the following code, what namespace does display3 belong to?
namespace ns1
{
void print);
void display1){};
}
namespace ns2
{
void print);
void display2){};
}
namespace
{
void display3);
}
int main)
{
using namespace ns1;
using namespace ns2;
display1);
display2);
return 0;
}
namespace
{
void display3)
{
}
}
(Short Answer)
4.8/5
(38)
If you have a class defined in separate files, and change the main program, which files need to be re-compiled?
(Multiple Choice)
4.9/5
(35)
If a name is defined in an unnamed namespace in a different compilation unit, it may not be accessed outside of that compilation unit.
(True/False)
5.0/5
(28)
A using directive that appears inside a set of braces applies
(Multiple Choice)
4.9/5
(40)
The file that contains the main portion of your program is called
(Multiple Choice)
4.8/5
(22)
Names that are defined outside of a namespace are part of the unnamed namespace
(True/False)
4.9/5
(37)
The file that contains the definitions of the member functions of a class is called the ________________
(Short Answer)
4.9/5
(40)
Showing 21 - 40 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)