46. The break statement is

A. a preprocessor directive
B. an operator in the C++ language
C. a keyword in the C++ language
D. switch in the C++ language
E. None of the above


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

47. A variable w with a value 67 may be defined with _______

A. int w = 67;
B. int w(67);
C. int 67(w);
D. both (a) and (b), but not (c).


Correct Answer:  D. both (a) and (b), but not (c).

48. An expression contains relational, assignment and arithmetic operators. In the absence of parentheses, the order of evaluation will be

A. assignment, relational, arithmetic
B. arithmetic, relational, assignment
C. relational, arithmetic, assignment
D. assignment, arithmetic, relational
E. None of the above


Correct Answer:  B. arithmetic, relational, assignment

49. The keyword virtual indicates that

A. a derived class has public access to a base class
B. more than one base class exists
C. a base class should be used only once in inheritance
D. a derived class should have more than one base class constructed


Correct Answer:  C. a base class should be used only once in inheritance

50. If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

A. Each object will store a separate copy of any static member data
B. Each object will store a separate copy of any member functions
C. Each object will store a separate copy of any nonstatic data members
D. You cannot declare two objects of the same class


Correct Answer:  C. Each object will store a separate copy of any nonstatic data members

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    four × 3 =