Tuesday 11 March 2014

OBJECT ORIENTED PROGRAMMING MCQS

1) Which can be passed as an argument to a function? 
 A. Constant
 B. Expression
 C. Another function
 D. All of the above
 Ans:- A

2) A class which can use all the features of an established class,is 
 A. A static class
 B. A super class
 C. A subclass
 D. Overloaded
Ans:-C

3) Use of virtual functions implies 
 A. Overloading
 B. Overriding
 C. Static binding
 D. Dynamic binding
Ans:-  D

4) If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access 
 A. Protected and public data only in C and B
 B. Protected and public data only in C
 C. Private data in A and B
 D. Protected data in A and B
Ans:-D

5) A blueprint for a software object is called a 
 A. Object
 B. Class
 C. Instance
 D. None of these
Ans:-B

6) A friend function to a class, C cannot access 
 A. Private data members and member functions
 B. Public data members and member functions
 C. Protected data members and member functions
 D. The data members of the derived class of C
Ans:-D

No comments:

Post a Comment