When is an object created and what is its lifetime?

Answer Posted / apurva jain

Object is created when constructor has to be invoked or
when have to access the class.Its Lifetime is throughout
the Execution of that Class.

Is This Answer Correct ?    30 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can destructor be overloaded?

605


write a program to find 2^n+1 ?

1561


why reinterpret cast is considered dangerous?

1912


What is static modifier?

644


Is react oop?

618






What are oops functions?

594


Where You Can Use Interface in your Project

1437


What is a class and object?

604


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1801


What do you mean by Encapsulation?

651


What are the advantages of polymorphism?

585


What is the real time example of inheritance?

649


What is difference between polymorphism and inheritance?

627


How do you define a class in oop?

641


Give two or more real cenario of virtual function and vertual object

1863