Difference between null pointer and dangling pointer?
Answer Posted / vrushali
NULL pointer points to nothing.
But dangling pointers are those pointers which points to
invalid location (e.g. still points to those memory
locations which are already freed)
int *p = NULL;
Is mere a pointer which is not initialised to valid
memroy location. it points to nothing
int *q ;
q -> 0x1A
free (q);
still we can access this pointer using q. Still memory has
not been released to the system.
Is This Answer Correct ? | 27 Yes | 5 No |
Post New Answer View All Answers
How do you write a program which produces its own source code as output?
Explain what is the difference between a string and an array?
How do you determine the length of a string value that was stored in a variable?
What are keywords in c with examples?
Describe the steps to insert data into a singly linked list.
what is the different bitween abap and abap-hr?
Explain what are global variables and explain how do you declare them?
What is c++ used for today?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
What do you mean by c what are the main characteristics of c language?
What is null in c?
What is size of union in c?
Difference between goto, long jmp() and setjmp()?
How to compare array with pointer in c?
What is structure in c definition?