Object Oriented Programming With C Plus Plus - Multiple Choice Questions -004

31. Which of the following is not a correct data type?
A. Float.
B. Real.
C. Int.
D. Double.
ANSWER: B
32. Which of the following is not an arithmetic operator?
A. +
B. *
C. -
D. &
ANSWER: D
33. For a binary member operator function, the left operand is passed through _____.
A. pointer.
B. reference.
C. this.
D. parameter.
ANSWER: C
34. Which of the following is a logical operator?
A. ++
B. ?:
C. ==
D. &&
ANSWER: D
35. What punctuation ends most lines of C++ code?
A. . (dot).
B. ; (semi-colon).
C. : (colon).
D. ' (single quote).
ANSWER: B
36. Which of the following is a correct comment?
A. */ Comments */.
B. ** Comment **.
C. /* Comment */.
D. { Comment }.
ANSWER: C
37. A class that is inherited is called as __________ class.
A. derived.
B. child.
C. base.
D. abstract.
ANSWER: B
38. __________ is the newline character.
A. \t
B. \b
C. \a
D. \n
ANSWER: D
39. When following piece of code is executed, what happens? b = 3; a = b++;
A. a contains 3 and b contains 4.
B. a contains 4 and b contains 4.
C. a contains 4 and b contains 3.
D. a contains 3 and b contains 3.
ANSWER: A
40. Which of the following is not a valid relational operator?
A. ==.
B. =>.
C. >=.
D. >=.

ANSWER: B

No comments:

Post a Comment