Computer Science - Object Oriented Programming Using C++

41. 

Recursive Functions

A. easier to code
B. executable faster than iterative ones
C. takes less main storage space
D. necessary to solve a certain class of problems
E. None of the above

Answer: Option D

Explanation:

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

42. 

The purpose of a conditional operator is to

A. select one of the two values
B. select the highest of the two values
C. select one of the two values depending on a condition
D. select the more equal of the two values
E. None of the above

Answer: Option C

Explanation:

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

43. 

Which of the following, if any, are valid names for variables?

A. amt.Sold
B. amt-Sold
C. amt_Sold
D. 98Sold
E. None of the above are valid names for variables

Answer: Option C

Explanation:

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

44. 

Assume you want to compare the character stored in the initial variable to the letter a. Which of the following conditions should you use in the if statement? (Be sure the condition will handle a or A.)

A. (initial = 'a' or 'A')
B. (initial == 'a' or 'A')
C. (toupper(initial) = 'A')
D. (toupper(initial) == 'A')

Answer: Option D

Explanation:

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

45. 

You can override a class's inherited access to make an individual member's access more ______

A. liberal
B. conservative
C. either (a) or (b)
D. neither (a) nor (b)

Answer: Option B

Explanation:

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