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 difference between static link library and dynamic link library?

7 Answers   Tech Mahindra,


Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply

3 Answers  


Do we have private destructors?

12 Answers   Symphony, TCS,


What is the use of seekg in c++?

0 Answers  


Why do we use classes in programming?

0 Answers  


Is map ordered c++?

0 Answers  


What is protected inheritance?

0 Answers  


What are the four partitions in which c++ compiler divides the ram?

0 Answers  


What are c++ stream classes?

0 Answers  


daily Routine of father

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 the difference between Pointer and a Reference? When you would use them?

4 Answers   Wipro,


Categories