What is Constructor

Answer Posted / amit chauhan

* these are the special member fun" used for automatic
initialization of the object of the class.
* these r defined along with other member fun"of the
class,but the format of the constructor definition is diff.
from the other member fun".
* constructor can take parameters in their parameter list as
needed, called parametrized constructor.
* but they can't return a value,not even void.
* the name of the constructor is same as that of the class.
* constructor r called automatically whenever an object of
the class is created.
* a constructor without any parameter is called default
constructor.
* there is one another type,called copy constructor.compiler
will use the copy constructor whenever you initialize an
instance using values of another instance of same type.

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a standard template library (stl)?

772


What two types of containers does the stl provide?

710


What is stl stand for?

875


When did c++ add stl?

886


What is meant by stl in c++?

834






Name the different types of stl containers.

845


What are stl algorithms?

781


What are the symptoms of stl?

767


help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase

2061


What is stl stack?

792


what is template and type convertion

2164


What is stl in oop?

876


Who wrote stl?

845


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

2050


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1865