Answer Posted / achal ubbott
Here is an example of dangling pointer.
char* p = new char;// allocate a byte from heap section.
delete p ; // deallocation.
*p = 44 ; // using a dangling pointer.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Where are setjmp and longjmp used in c++?
What is fixed in c++?
Can a constructor return a value?
What are the benefits of oop in c++?
What does new do in c++?
How the keyword struct is different from the keyword class in c++?
How is computer programming useful in real life?
Explain the differences between list x; & list x();.
Difference between Abstraction and encapsulation in C++?
What are friend classes? What are advantages of using friend classes?
When do we use copy constructors?
Define whitespace in C++.
What is the use of 'this' pointer?
What is pure virtual function?
Why is null pointer used?