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
Please explain the reference variable in c++?
Explain container class.
What are the four main data types?
Specify different types of decision control statements?
What is the extraction operator and what does it do?
How would you use qsort() function to sort an array of structures?
How can we access protected and private members of a class?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Which coding certification is best?
Why is c++ still popular?
What is a sequence in c++?
What do you understand by a pure virtual member function?
Does dev c++ support c++ 11?
Can malloc be used in c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.