Computer Science - Object Oriented Programming Using C++
|
|
|
|
Exercise"Nothing is impossible to a willing heart."
- (Proverb)
|
| 26. |
Which of the following statements uses the computer's clock to initialize the random number generator? |
| A. |
srand(time); | B. |
srand(time(NULL)); | | C. |
time(srand); | D. |
time(srand(NULL)); |
Answer: Option D
Explanation:
No answer description available for this question. Let us discuss.
|
| 27. |
A static data member is given a value |
| A. |
within the class definition | | B. |
outside the class definition | | C. |
when the program is executed | | D. |
never |
Answer: Option A
Explanation:
No answer description available for this question. Let us discuss.
|
| 28. |
You must provide a constructor for a derived class |
| A. |
always | | B. |
if the base class constructor required arguments | | C. |
if the base class constructor does not required arguments | | D. |
never |
Answer: Option D
Explanation:
No answer description available for this question. Let us discuss.
|
| 29. |
If you want to override constructor default values for an object you are instantiating, you must also override |
| A. |
all other parameters to that constructor | | B. |
all parameters to the left of that value | | C. |
all parameters to the right of that value | | D. |
no other parameters to that constructor |
Answer: Option E
Explanation:
No answer description available for this question. Let us discuss.
|
| 30. |
To use one of the C++ built-in mathematical functions, you must include the _____ header file in your program |
| A. |
calculation.h | B. |
compute.h | | C. |
expression.h | D. |
math.h | | E. |
mathematical.h |
Answer: Option B
Explanation:
No answer description available for this question. Let us discuss.
|
|
|