Object Oriented Programming Using C++ – Section 4

16. The word case used in the switch statement represents a

A. function in the C++ language
B. data type in the C++ language
C. keyword in the C++ language
D. global variable in the C++ language
E. None of the above

Correct Answer: C. keyword in the C++ language

17. Function templates _____________

A. must have exactly one parameter
B. may have more than one parameter as long as they are of the same type
C. may have more than one parameter of any type
D. may not have parameters

Correct Answer: C. may have more than one parameter of any type

18. The statement int num[2][3]={ {3,8,6}, {9,4,7}};

A. assigns a value 4 to num[1][2] B. assigns a value 7 to num[1][2] C. assigns a value 8 to num[1][2] D. assigns a value 9 to num[1][2]

Correct Answer: B. assigns a value 7 to num[1][2]

19. Private data can be accessed by

A. class member functions
B. functions in derived classes
C. both (a) and (b)
D. neither (a) nor (b)

Correct Answer: A. class member functions

20. The store of memory available to programs is the _____

A. store
B. stack
C. pile
D. heap

Correct Answer: D. heap

Leave A Comment?

four × 2 =