Object Oriented Programming Using C++ – Section 2

31. Errors in a program are called

A. accidents
B. annoyances
C. bugs
D. mistakes
E. typing errors

Correct Answer:  C. bugs
Advertisement

32. If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

A. Each object’s nonstatic data members will be stored in the same memory location
B. Each object will be stored in the same memory location
C. Each object will have a unique memory address
D. You cannot declare two objects of the same class

Correct Answer:  C. Each object will have a unique memory address
Advertisement

33. Which of the following is the inequality operator?

A. !=
B. =
C. ==
D. –>
E. <>

Correct Answer:  A. !=
Advertisement

34. If a derived class uses the public access specifier, then _____

A. public base class members remain public in the derived class
B. protected base class members become public in the derived class
C. both (a) and (b)
D. neither (a) nor (b)

Correct Answer:  A. public base class members remain public in the derived class
Advertisement

35. The operator that releases previously allocated memory is _____

A. release
B. return
C. delete
D. destroy

Correct Answer:  C. delete
Advertisement

Leave A Comment?