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 public and private data members?

0 Answers  


State the difference between delete and delete[].

0 Answers  


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

0 Answers   Nucleus, TCS,


Is it possible to provide special behavior for one instance of a template but not for other instances?

0 Answers  


Difference between class and structure.

0 Answers  


Explain 'this' pointer and what would happen if a pointer is deleted twice?

0 Answers   Genpact,


how many controls can we place on single form.

1 Answers   Microsoft,


implement stack using stack.h headerfile functions

1 Answers   Exilant, GMG, Subex, University,


Briefly describe a B+ tree. What is bulk loading in it?

0 Answers   Wipro,


What is a rooted hierarchy?

0 Answers  


What is the basic structure of c++ program?

0 Answers  


What is a literal in c++?

0 Answers  


Categories