Contents

Which of the following is not a type of access specifier?
a) public                                               
b) private
c) final                                  
d) protected

c

Which of the following provides a mechanism for declaring and initializing objects?
a) constructor functions                                  
b) member function
c) friend function
d) destructor

a

The access to public functions of a class is available to……
a) only public member                      
b) any place the class is visible
c) private member function                              
d) only member function

b

The constructor for class is executed when……….
a) it is called         
b) object needs destructor
c) object is destroyed
d) object is created

d

The destructor for a class is called automatically when…….
a) object goes out of scope                              
b) object comes into scope
c) new operator is called                                    
d) object becomes a memory leak

a

Which of the following is valid header for person constructor?
a) person:: int age                                                               
b) person:: person (int age)
c) person: person (int age)
d) both b & c

b