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

Is python written in c or c++?

0 Answers  


What is the latest version on c++?

0 Answers  


Which function cannot be overloaded c++?

0 Answers  


What is a local reference?

0 Answers  


What is vector pair in c++?

0 Answers  


Difference between overloading vs. Overriding

0 Answers  


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

0 Answers  


What are static and dynamic type checking?

0 Answers  


How would you implement a substr() function that extracts a sub string from a given string?

0 Answers  


What are the 2 main types of data structures?

0 Answers  


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

0 Answers  


What will happen if when say delete this ?

7 Answers  


Categories