Ask Question         Q & A         Articles        
Skip Navigation LinksHome > Discussion Topics > Discussions
Discuss this Question
0
Copy constructor gets called automatically when a object is returned by value from a function.
  • Yes
  • No
Answer : Yes
Previous Comments
0
what is when a object return from function ?is it means once object created?
On : 04-Feb-2012
By : sre
A constructors has not any kind of return type, because constructor are special type of functions which call automatically when object is created .  
   constructor are used to initialize the member variable inside the class.
there are two conditions to make any constructor ->
1->name of constructor should be same as class name.
2->it will have any kind of return type.
note-> void is also a return type, which return nothing,so we can't use void with constructor.
                                                            thanku.
By : govind palaria   On : 15-Mar-2012
0
what is the return type of constructors
On : 20-Apr-2011
0
Constructors are the functions of a class which get called automatically when the object of that class is created.
On the other hand Destructors are the functions which get called when object of the class is destroyed.
On : 19-Apr-2011
0
can anybody tell me what are constructor and destructor in c langauge
On : 12-Apr-2011
By : suyash
Your Comments
Ask a Question