Q.31  Use of virtual functions implies
(A)  overloading.  (B)  overriding.
(C)  static binding.  (D)  dynamic binding.
Ans: D
 
Q.32   this pointer  
   
(A)  implicitly points to an object.   
(B)  can be explicitly used in a class.
(C)  can be used to return an object.  
(D)  All of the above.
 
 Ans: D
 
Q.33   Within a switch statement

    (A) Continue can be used but Break cannot be used  
    (B) Continue cannot be used but Break can be used
    (C) Both Continue and Break can be used   
    (D) Neither Continue nor Break can be used
 
  Ans:B
 
Q.34   Data members which are static

    (A) cannot be assigned a value
    (B) can only be used in static functions
    (C) cannot be defined in a Union  
    (D) can be accessed outside the class
    
  Ans:B
 
Q.35   Which of the following is false for cin?  
 
(A)  It represents standard input.  
(B)  It is an object of istream class.
(C)  It is a class of which stream is an object.  
(D)  Using cin the data can be read from user’s terminal.
 
  Ans:C
 
Q.36  It is possible to declare as a friend 
                                 
(A)   a member function  (B)  a global function
(C)   a class  (D)  all of the above
     
  Ans:D
 
Q.37  In multiple inheritance  

(A)  the base classes must have only default constructors   
(B)  cannot have virtual functions
(C)  can include virtual classes   
(D)  None of the above.
 
  Ans:C


Q.38 Declaration of a pointer reserves memory space  
(A)  for the object.
(B)  for the pointer.
(C)  both for the object and the pointer.
(D)  none of these.
 
   Ans:B
 
Q.39  for (; ;)

(A)  means the test which is done using some expression is always true   
(B)  is not valid
(C)  will loop forever  
(D)  should be written as for( )
 
  Ans:C
 
Q.40   The operator << when overloaded in a class

(A)  must be a member function  (B)  must be a non member function  
(C)  can be both (A) & (B) above  (D)  cannot be overloaded
 
  Ans:C
 
Q.41  A virtual class is the same as   
 
(A)  an abstract class  (B)  a class with a virtual function
(C)  a base class  (D)  none of the above.
 
  Ans:D
 
Q.42   Identify the operator that is NOT used with pointers
 
     (A)  ->  (B)  &
     (C)    *  (D)  >> 
 
  Ans:D
 
Q.43   Consider the following statements

          char *ptr;
          ptr = “hello”;
         cout << *ptr;                    
       What will be printed?     
(A)  first letter  (B)  entire string  
(C)  it is a syntax error  (D)  last letter       
   
   Ans:A
 
Q.44  In which case is it mandatory to provide a destructor in a class?
 
(A)  Almost in every class
(B)  Class for which two or more than two objects will be created
(C) Class for which copy constructor is defined  
(D) Class whose objects will be created dynamically
 
  Ans:D
 
Q.45   The members of a class, by default, are  

 (A)  public  (B) protected
 (C)  private  (D)  mandatory to specify  
   
  Ans:C