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

Why is polymorphism useful?

0 Answers  


what are the types of Member Functions?

0 Answers  


What is array in c++ example?

0 Answers  


Why null pointer is used?

0 Answers  


Explain the differences between private, public and protected and give examples.

0 Answers  


What are virtual functions and what is its use?

1 Answers  


What do you mean by C++ access specifiers ?

1 Answers  


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

0 Answers  


Please explain the reference variable in c++?

0 Answers  


What is the difference between containment and delegation?

0 Answers  


What is a dangling pointer in c++?

0 Answers  


What is a dangling pointer?

3 Answers   Glenwood,


Categories