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...


Can a constructor return a value?



Can a constructor return a value?..

Answer / nashiinformaticssolutions

It is possible for a constructor to return a value. A constructor cannot explicitly return a value; instead, it implicitly replaces the current instance of the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.

2 Answers   Quark,


Write a C++ Program to Multiply two Numbers

1 Answers  


What are the advantages of using typedef in a program?

0 Answers  


why the size of an empty class is 1

4 Answers  


What is a storage class? Mention the storage classes in c++.

0 Answers  


What is a node class?

1 Answers  


why all c++ program must have default constructor?

6 Answers   IBM,


What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?

3 Answers  


What does it mean to declare a member variable as static?

0 Answers  


Do we have to use initialization list in spite of the assignment in constructors?

0 Answers  


Do class declarations end with a semicolon?

0 Answers  


What is the keyword auto for?

0 Answers  


Categories