Object Oriented Programming Using C++ – Section 10

41. The logical NOT operator represented by is a

A. unary operator
B. binary operator
C. ternary operator
D. octal operator
E. None of the above

Correct Answer:  A. unary operator

42. When variables refer to attributes of an entity (such as name, address, and phone number of a person), those attributes form a _____

A. file
B. record
C. field
D. program

Correct Answer:  B. record

43. A derived class _____ override attributes of a parent class

A. may
B. may if the two classes have the same name
C. must
D. must not

Correct Answer:  A. may

44. Which of the following is false?

A. You enclose a function’s statements in a set of braces
B. The function header is considered a C++ statement, so it must end in a semicolon.
C. The keyword void tells the C++ compiler that the function does not return a value
D. A function can receive information that you send (pass) to it
E. An empty set of parentheses after the function’s name in the function header tells you that the function does not receive any information

Correct Answer:  B. The function header is considered a C++ statement, so it must end in a semicolon.

45. A function’s single most important role is to

A. give a name to a block of code
B. reduce program size
C. accept arguments and provide a return value
D. help organize a program into conceptual units
E. None of the above

Correct Answer:  D. help organize a program into conceptual units

Leave A Comment?

5 × three =