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
Explain modulus operator. What are the restrictions of a modulus operator?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Where are local variables stored in c?
Tell me the use of bit field in c language?
What is table lookup in c?
What's the best way of making my program efficient?
How can you avoid including a header more than once?
By using C language input a date into it and if it is right?
Explain how do you determine a file’s attributes?
Explain the difference between null pointer and void pointer.
What are the 4 types of organizational structures?
What are the different types of C instructions?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
How can I do peek and poke in c?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.