When will a constructor executed?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 3 principles of oop?

824


what are the different types of qualifier in java?

2005


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2973


i got a backdoor offer in process global,Bangalore..Can i work with it?

2568


What is object-oriented programming? Webopedia definition

944


What is an example of genetic polymorphism?

859


What is the main purpose of inheritance law?

929


What is the important feature of inheritance?

847


What is an advantage of polymorphism?

815


What is ambiguity in inheritance?

834


What is pure oop?

835


what is graphics

2202


What is inheritance in simple words?

806


What is inheritance and how many types of inheritance?

805


What is the full form of oops?

904