Programming - C++ Language

You Are Here :: Home > C++ Language > constructor - General Questions

 
13.

The principle of__________allows us to create new classes based on existing classes.                        


A. copy construction B. function overloading
C. inheritance D. polymorphism




14.

A constructor that accepts __________ parameters is called the default constructor.                        


A. one B. two
C. no D. three




15.

What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?                        


A. Compile-time error. B. Preprocessing error.
C. Runtime error. D. Runtime exception.




16.

A union that has no constructor can be initialized with another union of __________ type.                        


A. different B. same
C. virtual D. class




17.

Destructor has the same name as the constructor and it is preceded by ______ .                        


A. ! B. ?
C. ~ D. $




18.

Which of the following gets called when an object goes out of scope?                        


A. constructor B. destructor
C. main D. virtual function




« prev

1

2

3

4

5

6

7

8

9

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on