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 |
How is exception handling carried out in c++?
what is use to destroy an object? illustrate.
Whats oop mean?
What is byval and byref? What are differences between them?
What are benefits of oop?
How is data security provided in Object Oriented languages? ?
What are different oops concepts?
What is polymorphism give a real life example?
What is difference between data abstraction and encapsulation?
What is encapsulation in ict?
i^=j; j^=i; i^=j; value of i,j
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.