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

why reinterpret cast is considered dangerous?

1896


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1778


What is the difference between static polymorphism and dynamic polymorphism?

579


Is oop better than procedural?

569


What causes polymorphism?

569






What are the components of marker interface?

600


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1652


What is inheritance and how many types of inheritance?

614


What is the difference between abstraction and polymorphism?

613


can we make game by using c

3416


What is basic concept of oop?

696


What is methods in oop?

537


Write a c++ program to display pass and fail for three student using static member function

2810


• What are the desirable attributes for memory managment?

1725


What is polymorphism explain its types?

674