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 the size of integer variable?

0 Answers  


What are all predefined data types in c++?

0 Answers  


Compare compile time polymorphism and Runtime polymorphism

1 Answers  


What is a map in c++?

0 Answers  


What is the extraction operator and what does it do?

0 Answers  


Which is the best c++ compiler?

0 Answers  


int *p = NULL; printf("%1d",p) ; what will be the output of this above code?

3 Answers   Microsoft,


What is singleton pattern in c++?

0 Answers  


What is the best c++ book for beginners?

0 Answers  


What is iterator in c++?

0 Answers  


What happens when a function throws an exception that was not specified by an exception specification for this function?

1 Answers  


What is general format for a prototype?

0 Answers  


Categories