When will a constructor executed?

Answers were Sorted based on User's Feedback



When will a constructor executed?..

Answer / ssss

When ever object is created.

Is This Answer Correct ?    27 Yes 2 No

When will a constructor executed?..

Answer / preeti

Constructor execution is depend on its type like,

1) inbuilt or default construtor, no parameter constructor
are executes whenever object creates.

2) parameterized constructor execute whenever it calls.

3) base class constructor execute before than child class
constructor(child class is derived from base class
constructor).

Is This Answer Correct ?    21 Yes 1 No

When will a constructor executed?..

Answer / rahul

When an object create means suddenly construtor get executed

Is This Answer Correct ?    22 Yes 3 No

When will a constructor executed?..

Answer / priya

Constructor gets called when we create an object,or when we
allocated memory using new operator:

void main()
{
test *t = new test;
delete t;
}

Is This Answer Correct ?    13 Yes 0 No

When will a constructor executed?..

Answer / poorna chandar rao

when ever object is created automatically (conncurently
)construcor also executed

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More OOPS Interview Questions

Is react oop?

0 Answers  


Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.

1 Answers   Global Academy, Infotech,


why c++ is a highlevel language

3 Answers   Satyam, Tech Mahindra,


Difference ways of Polymorphism?

3 Answers  


What is a linked list?

7 Answers   IBM, Neural Info,






There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

2 Answers  


what is a class

6 Answers  


How do you define a class in oop?

0 Answers  


What is namespace?

15 Answers  


Why multiple inheritance is not allowed?

0 Answers  


what is polymorphism?

4 Answers  


what are three tenets of object orinted Systems?Why they call like that ? Please answer me. Advance thanks.

2 Answers   Excel,


Categories