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
When a c file is executed there are many files that are automatically opened what are they files?
Explain continue keyword in c
Is int a keyword in c?
What is a 'null pointer assignment' error?
What is uint8 in c?
What are the advantages of external class?
Write a program to print all permutations of a given string.
What is a const pointer?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is the best way to comment out a section of code that contains comments?
What are reserved words with a programming language?
What is 1f in c?
Do you know what are bitwise shift operators in c programming?
What does sizeof int return?
Can a program have two main functions?