Computer Science - Object Oriented Programming Using C++

6. 

A function that is called automatically each time an object is destroyed is a

A. constructor
B. destructor
C. destroyer
D. terminator

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

7. 

We can output text to an object of class ofstream using the insertion operator « because

A. the ofstream class is a stream
B. the insertion operator works with all classes
C. we are actually outputting to cout
D. the insertion operator is overloaded in ofstream

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

8. 

The operator that allocates new memory is _____

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

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

9. 

A comment

A. is a note that can be put into the source code
B. is ignored by the compiler.
C. starts with the /* character pair
D. All of the above
E. None of the above

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

10. 

Which of the following is(are) valid identifier(s)?

A. record_1
B. 1 record
C. return
D. $tax
E. None of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.