Exam 12: Separate Compilation and Namespaces

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

The identifier used in the #ifndef directive should be

(Multiple Choice)
4.8/5
(41)

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)

Classes must always be defined in separate files

(True/False)
4.8/5
(46)

The global namespace and the unnamed namespace are the same.

(True/False)
4.7/5
(37)

A using directive that appears inside a set of braces applies

(Multiple Choice)
4.9/5
(40)

The statement using namespace std is called _______________.

(Short Answer)
4.7/5
(43)

ADTs should be defined and implemented in separate files

(True/False)
4.8/5
(30)

A using directive that is at the start of the file

(Multiple Choice)
4.9/5
(40)

What is the difference between an ADT and a class in C++?

(Multiple Choice)
4.8/5
(32)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)