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);
Which of the following cannot be inherited ?
Public data members
Constructor functions
Void functions
Overloaded + operators
Which of the following is used in copy constructor to receive its arguments ?
Either pass-by-value or pass-by-reference
Only pass-by-value
Only pass-by-reference
Only pass-by-address
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 constructor function is designed to copy objects of the same class type ?
Create constructor
Object constructor
Copy constructor
Dynamic constructor
Which of the following gets called when an object goes out of scope ?
Constructor
Destructor
Main
Virtual function
What will happen in dynamic construction of objects?
Creating objects dynamically.
Allocating memory of objects dynamically.
Dynamic object construction.
Static object construction.
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.
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