When will a constructor executed?
Answers were Sorted based on User's Feedback
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 |
Answer / rahul
When an object create means suddenly construtor get executed
Is This Answer Correct ? | 22 Yes | 3 No |
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 |
Answer / poorna chandar rao
when ever object is created automatically (conncurently
)construcor also executed
Is This Answer Correct ? | 6 Yes | 1 No |
Is react oop?
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?
What is a linked list?
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?
what is a class
How do you define a class in oop?
What is namespace?
Why multiple inheritance is not allowed?
what is polymorphism?
what are three tenets of object orinted Systems?Why they call like that ? Please answer me. Advance thanks.