Difference between null pointer and dangling pointer?

Answer Posted / vadivel t

Minor correction in my ans #4...

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(ie., address
is valid but no more in the allocated memory pool. It will
be added in the free memory pool).

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

1620


What is %d called in c?

749


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1574


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

770


Is c is a procedural language?

586






What is the use of ?: Operator?

660


What is meant by int main ()?

712


c language interview questions & answer

1452


What is union and structure?

565


How are pointers declared in c?

590


Write a program to reverse a string.

629


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1856


What is data type long in c?

617


Explain what are the different file extensions involved when programming in c?

626


Differentiate between null and void pointers.

623