what is costructor?

Answer Posted / dipraj shahane

Constructor is special member function of class which having
same name as Class name and no return type. Main function of
Constructor is to initialize (give default values to member
variable of class object) object. Constructor gets invoke
when you create new object by following syntax.

ClassName objectName = new ClassName();

Is This Answer Correct ?    22 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable example?

601


Why do pointers exist?

671


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1424


Whats is abstraction in oops?

597


Why interface is used?

559






I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1636


Why do we use class?

645


Get me a number puzzle game-program

1700


What does and I oop mean?

625


What is the point of polymorphism?

599


What is oops and why we use oops?

581


Which is better struts or spring?

629


Why polymorphism is used in oops?

594


What is balance factor?

597


What is class and object in oops?

619