Which of the following gets called when an object goes out of scope ?
Constructor
Destructor
Main
Virtual function
Which of the following cannot be the constructor of class 'Student'?
Student(){ }
Student(int a,int b){ }
public Student(int a){ }
student(int a,int b,float c){ }
Which of the following enables automatic initialization of object?
new keyword
delete keyword.
constructor.
destructor.
When an object is created which function will be automatically invoked ?
Friend function
Destructor function
Static function
Constructor function
Which of the following will make the invocation of the object constructor-"read(int x,int y=3){ }" ?
read ob();
read ob(2);
read ob(2.0);
none of these.
What will happen in dynamic construction of objects?
Creating objects dynamically.
Allocating memory of objects dynamically.
Dynamic object construction.
Static object construction.
What is the correct syntax to assign an object ob1 to ob2 of a class 'read' using copy constructor?
ob2=ob1;
ob2=read(ob1);
read(ob2,ob1);
read ob2(ob1);
Which constructor function is designed to copy objects of the same class type ?
Create constructor
Object constructor
Copy constructor
Dynamic constructor
Which of the following is correct for invoking a constructor-" read(int x,int y){ };" ?
read ob;
read (2,3);
read ob(2.3,3);
read ob(2,3);
What is called default constructor ?
A constructor that accepts one parameter
A constructor that accepts two parameters
A constructor that accepts no parameter
A constructor that accepts three parameters