Question Bank MCQs - OOPM CS 305
Question Bank MCQs - OOPM CS 305
Q.13 A member function can always access the data in __________ , (in C++).
A. All objects of a class share all data members of class
B. Objects of a class do not share non-static members. Every object has its own copy.
C. Objects of a class do not share codes of non-static methods, they have their own
copy
D. None of the above
Ans . A
Q.13 In CPP, members of a class are ______ by default.
A. Public
B. Private
C. Protected
D.Static
Ans . B
Q.14 An expression A.B in C++ means ____
A. A is member of object B
B. B is member of Object A
C. Product of A and B
D. None of these
Ans . B
Q. 18 Which of the following term is used for a function defined inside a class?
A. Member Variable
B. Member function
C. Class function
D. Classic function
Ans . B
A. operator
B. function
C. object
D. macro
Ans . C
Q.23 Which of the following is the correct class of the object cout?
A. iostream
B. istream
C. ostream
D. ifstream
Ans . C