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
Which is best book for data structures in c?
Explain the array representation of a binary tree in C.
Explain argument and its types.
Explain what is the advantage of a random access file?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What are c identifiers?
What is the most efficient way to store flag values?
What is pointer & why it is used?
What is the difference between text and binary modes?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What is the use of header files?
What is string concatenation in c?
Which header file is essential for using strcmp function?
What is external variable in c?