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


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is virtual destructor? What is its use?

0 Answers  


Explain calling an object's member function(declared virtual)from its constructor?

1 Answers  


Why main function is special in c++?

0 Answers  


Explain object slicing in c++?

0 Answers  


What is an iterator class in c++?

0 Answers  


What does asterisk mean in c++?

0 Answers  


What is a "RTTI"?

6 Answers   HCL,


What is else if syntax?

0 Answers  


What's the best free c++ profiler for windows?

0 Answers  


What is long in c++?

0 Answers  


Why the usage of pointers in C++ is not recommended ?

0 Answers   TCS,


make a middle node of doubly linklist to the top of the list

1 Answers  


Categories