Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is Constructor

Answers were Sorted based on User's Feedback



What is Constructor..

Answer / m.shanmuga sundaram

Constructor is a default member function available with a
class.

It can be explicitly defined in a class to initialize the
variables.

Constructor is called when an object is created for a class.

Rules for defining a constructor
********************************

The name of the constructor should possess the same name of
the class.

The constructor member function should not return a value.

Is This Answer Correct ?    102 Yes 17 No

What is Constructor..

Answer / shalini chopra

IT IS A MEMBER FUNCTION WHOSE TASK IS TO INITIALIZE THE
OBJECTS OF ITS CLAASS.
IT IS INVOKED A SOON AS THE OBJECT ASSOCIATED WITH THAT
CLASS IS CREATED.
ITS TYPES:-
1> COPY CONSTRUCTOR
2>
PARAMITERISED CONSTRUCTOR
3>
DUMMY CONSTRUCTOR
4>
DYNAMIC CONSTRUCTOR

Is This Answer Correct ?    103 Yes 19 No

What is Constructor..

Answer / gunda

IT IS JUST LIKE A FUNCTION WHOSE NAME IS SAME AS IT'S CLASS
NAME THE CONSTRUCTOR IS INVOKED WHEN IT'S APPROPRIATE
OBJECT IS CREATED

Is This Answer Correct ?    47 Yes 7 No

What is Constructor..

Answer / bala

one more point.
You can not call the constructor like calling the member function.

Is This Answer Correct ?    16 Yes 3 No

What is Constructor..

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

What is Constructor..

Answer / manish

Constructor is a special type member function of class,it is
special becoz its name is same as its class name in wich it
is declared.
It has no return type even void.
Its main purpose is to initialize the object of the class in
which it is declared & this is happen as soon as the objwct
is created.

Is This Answer Correct ?    14 Yes 8 No

What is Constructor..

Answer / narayan prajapati

Constructor is What?
Example(Constructing Builings Or in our programing Builing
Programs)
1.It Should Have Same Class Name eg.(Fun)& Function Name eg.
(Fun)And Pass Suitable Parameters
2.Its Function Doesn't Return Value.
3.When Object is Initialize,it Directly Call.
4.constructor Works First & then When main Function work
completed the Destructor Come to work,And Clear the
Previous Data.
5.while Initializing parameters in main function,we Should
take Care Of Constructor Function Parameters eg.(If 2
parameters Are pass in constructor function then is
necessary to pass 2 parameters in main function,if not it
Will Send An Error!)

Is This Answer Correct ?    8 Yes 4 No

What is Constructor..

Answer / roli

Constructor is a function which envoked as soon as the
object of a class is created.

Is This Answer Correct ?    4 Yes 0 No

What is Constructor..

Answer / gunalan

Constructor is a default member function available with a
class.The constructor member function should not return a value.

Is This Answer Correct ?    9 Yes 6 No

What is Constructor..

Answer / reet bansal

a constructor is a class mamber function in c++ and c# that
has the same name as the class itself.
the porpose of the constructor is to itialize all member
variables whe a oject of this class is created.any resourse
acquired such as memory or open files are typically
released in the class constructor.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More STL Interview Questions

c# support late binding or early binding.

6 Answers  


If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2. please answer my question ....

0 Answers   Microsoft,


What is stl in oop?

0 Answers  


What is stl language?

0 Answers  


Why should a c++ programmer be interested in stl?

0 Answers  


totoo po ba ang manga aliens!

0 Answers  


what is an algorithm in terms of STL?

1 Answers   Lucent, Wipro,


What is Constructor

14 Answers   Angel Broking,


write a program to convert a decimal number in to its equivalent binary number?

0 Answers  


what is strcture i++ i ++i answer to this i=5 what is the out put

6 Answers  


wap in c++ which accept a integer array and its size as argument and replaces element having even values with its half and element having odd values with twice its value

1 Answers  


what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?

2 Answers  


Categories