Difference between null pointer and dangling pointer?

Answer Posted / vadivel t

To Sourisengupta Question.

free() shall free the memory which is allocated dynamically.

But afrer the free() function being called,the pointer
which u r passing to free() as an argument, shall point to
the same base address, which is no more valid.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

any "C" function by default returns an a) int value b) float value c) char value d) a & b

673


Is that possible to add pointers to each other?

907


What are variables c?

626


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1719


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5065






What is a null pointer in c?

602


What is the difference between int main and void main?

580


Can main () be called recursively?

637


What are bitwise shift operators in c programming?

650


Can you define which header file to include at compile time?

593


What are formal parameters?

665


How can you draw circles in C?

633


Explain how can I write functions that take a variable number of arguments?

619


Explain can static variables be declared in a header file?

686


Do pointers store the address of value or the actual value of a variable?

615