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

141. _______________ operator has the highest priority among the following.
A. =
B. +
C. ::
D. ()
ANSWER: C
142. An ____________ is a collection of elements of same data type.
A. structure
B. union
C. class
D. array
ANSWER: D
143. A function that does not return a value will have return type _________________.
A. int
B. void
C. float
D. char
ANSWER: B
144. ______________ operator has the lowest priority.
A. ,
B. ++
C. *
D. +
ANSWER: A
145. ________________ is an increment operator
A. +
B. >
C. ++
D. ?:
ANSWER: C
146. ___________ variables can be initialized only once.
A. void
B. static
C. const
D. int
ANSWER: B
147. Static variables can be ______________.
A. cannot be created
B. initialized only once.
C. a constant
D. a class
ANSWER: B
148. Which of the following is true?
A. presents the standard output stream in c++.
B. cout declare in the conio standard file.
C. cout is declared as constants.
D. cout does nothing in C++ program.
ANSWER: A
149. What is the syntax of friend function?
A. friend class1 Class2;
B. friend class;
C. friend class
D. classfriend
ANSWER: A
150. Which of the following is not a type of constructor?
A. Copy constructor.
B. Friend constructor.
C. Default constructor.
D. Parameterized constructor.

ANSWER: B

No comments:

Post a Comment