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
What return value must conversion operators have in their declaration?
Explain dangling pointer.
Why is c++ still best?
what are the iterator and generic algorithms.
What are vectors used for in c++?
Is vector a class in c++?
Why do we use templates?
What is the meaning of string in c++?
How do you save a c++ program?
What are stacks?
Explain data encapsulation?
Why do we use structure in c++?
Is c++ high level programming language?
Difference between delete and free.
What is &x in c++?