GYANTONIC
Placement Preparation
Aptitude Test
HR Interview
C / C++ Test
Career
Login
Create Account
Ask Question
Q & A
Articles
Become Mentor
Home
>
Discussion Topics
>
Discussions
Discuss this Question
Copy constructor gets called automatically when a object is returned by value from a function.
Yes
No
Answer :
Yes
Share
|
Previous Comments
what is when a object return from function ?is it means once object created?
On :
04-Feb-2012
By :
sre
Report Abuse
|
Reply
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
what is the return type of constructors
On :
20-Apr-2011
By :
Neeru Bakshi
Report Abuse
|
Reply
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
By :
Tarun Sharma
Report Abuse
|
Reply
can anybody tell me what are constructor and destructor in c langauge
On :
12-Apr-2011
By :
suyash
Report Abuse
|
Reply
Your Comments
Login to Post
Ask a Question
Type your question here.
Latest Articles
What to opt after B.Tech: MBA or M.Tech
The .NET FRAMEWORK
Importance of practical education
Choosing the right Coaching Centre
Understanding Locking in SQL Server
How to cope with failure
Entrepreneurship - the need of the hour
All Articles...