Object Oriented Programming Oop Set 3
Object Oriented Programming Oop Set 3
[set-3]
52. C++ programmers concentrate on creating , which contain data members and
the member functions that manipulate those data members and provide services to
clients.
o m
A. structures
. c
B. classes
te
C. objects
a
D. function
Answer: B
q M
53. Which of the following isM
c
FALSE about references in C++
A. a reference must be initialized when declared
B. once a reference is created, it cannot be later made to reference another object; it cannot be
reset
C. references cannot be null
D. references cannot refer to constant value
Answer: D
56. Which of the following operators are overloaded by default by the compiler?
1) Comparison Operator ( == )
2) Assignment Operator ( = )
A. both 1 and 2
B. only 1
C. only 2
D. none of the two
Answer: C
57. Which of the following is true about inline functions and macros.
A. inline functions do type checking for parameters, macros don't
B. macros cannot have return statement, inline functions can
C. macros are processed by pre-processor and inline functions are processed in later stages of
compilation.
D. all of the above
Answer: D
64. What will be the values of x, m and n after execution of the following
statements? Int x, m, n;
m=10; n=15;
x= ++m + n++;
A. x=25, m=10, n=15
B. x=27, m=10, n=15
C. x=26, m=11, n=16
D. x=27, m=11, n=16
Answer: C
66. Which of the following is the correct class of the object cout?
A. iostream
B. istream
C. ostream
D. ifstream
Answer: C