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
What is the difference between #import and #include in c++?
write a porgram in c++ that reads an integer and print the biggest digit in the number
Is java based off c++?
Can I run c program in turbo c++?
Is string an object in c++?
Which is the best c++ compiler for beginners?
What are structs in c++?
Explain differences between alloc() and free()?
Can I learn c++ as my first language?
Explain how we implement exception handling in c++?
What is lvalue?
How do I open binary files?