Object Oriented Programming Using C++ – Section 7

16. The C++ operator used to allocate memory is _________

A. mem
B. allocate
C. new
D. create

Correct Answer:  C. new
Advertisement

17. Assume that your version of C++ can recognize only the first 8 characters of an identifier name, through identifier names may be arbitrarily long. Which of the following identifier names is not distinct:

A. list, list2
B. address, Address
C. identifier_l, identifier_2
D. answer, ANSWER
E. None of the above

Correct Answer:  C. identifier_l, identifier_2
Advertisement

18. Object is to class as _____

A. library is to book
B. mother is to daughter
C. Plato is to philosopher
D. president is to Lincoln

Correct Answer:  C. Plato is to philosopher
Advertisement

19. A derived class may also be called a

A. subclass
B. super class
C. parent class
D. base class

Correct Answer:  A. subclass
Advertisement

20. The C++ keyword for declaring a variable that contains a decimal point is _____

A. dec
B. decimal
C. float
D. floater
E. None of the above

Correct Answer:  C. float
Advertisement

Leave A Comment?