Object Oriented Programming Using C++ – Section 9

36. One of the valid escape sequences used in the C language is

A. \z
B. \N
C. \t
D. \s
E. None of the above

Correct Answer:   C. \t

37. A default constructor

A. takes no arguments
B. has default values for all its arguments
C. either (a) or (b)
D. neither (a) nor (b)

Correct Answer:   C. either (a) or (b)

38. Which of the following will increase the value stored in the first element of the fee array by 2?

A. amount[0] = amount[0] + 2;
B. amount, fee[0] = amount, fee [0] + 2;
C. feelnfo.amount[0] = feelnfo.amount[0] + 2;
D. fee[0].amount = fee[0].amount + 2;
E. fee.amount[0] = fee.amount[0] + 2;

Correct Answer:   D. fee[0].amount = fee[0].amount + 2;

39. Which loop always processes its instructions at least once?

A. do-while
B. for
C. while

Correct Answer:   A. do-while

40. When a new class is derived from an existing class, the derived class member functions _____ have names that differ from base class function names

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

Correct Answer:   A. may

Leave A Comment?

thirteen + seven =