Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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 / rahul

When an object create means suddenly construtor get executed

Is This Answer Correct ?    22 Yes 3 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

Is This Answer Correct ?    20 Yes 1 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

What is object-oriented programming? Webopedia definition

0 Answers  

what is an instance of a class

5 Answers  

Whats oop mean?

0 Answers  

What is polymorphism and why is it important?

0 Answers  

What is virtual class and friend class?

5 Answers   IBS, Intel, Wipro,

String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

0 Answers   HCL,

what is overloading and overriding?

7 Answers  

Explain polymorphism? What r the types of polymorphism? pls give examples?

4 Answers   HCL,

oops concept is used for?

3 Answers   Synergy,

What type of loop is a for loop?

0 Answers  

Why is abstraction needed?

0 Answers  

what is the application of oops?

8 Answers   IBM,