Choose a topic to test your knowledge and improve your C/C skills
A constructor that accepts __________ parameters is called the default constructor.
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?
Destructor has the same name as the constructor and it is preceded by ______ .
For automatic objects, constructors and destructors are called each time the objects
Which constructor function is designed to copy objects of the same class type?
Which of the following statement is correct?
Which of the following statement is incorrect?
When are the Global objects destroyed?
Copy constructor must receive its arguments by __________ .
A function with the same name as the class, but preceded with a tilde character (~) is called __________ of that class.
A union that has no constructor can be initialized with another union of __________ type.
Which of the following gets called when an object goes out of scope?
Which of the following statement is correct?
________ used to make a copy of one class object from another class object of the same class type.
Constructors __________ to allow different approaches of object construction.
Which of the following statement is correct?
Which of the following cannot be declared as virtual?
If the copy constructor receives its arguments by value, the copy constructor would
Which of the following are NOT provided by the compiler by default?
It is a __________ error to pass arguments to a destructor.
If the programmer does not explicitly provide a destructor, then which of the following creates an empty destructor?
A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values
How many default constructors per class are possible?
Which of the following statement is correct about destructors?
Which of the following statement is correct?
Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class?
A destructor takes __________ arguments.
Destructor calls are made in which order of the corresponding constructor calls?
Which of the following never requires any arguments?
A class's __________ is called when an object is destroyed.
Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort.
Which of the following statement is correct?
Which of the following statements are correct?
How many times a constructor is called in the life-time of an object?
Which of the following gets called when an object is being created?
To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .
Which of the following statement is correct about constructors?
Which of the following statement is correct whenever an object goes out of scope?