What are dangling pointers? How are dangling pointers different from memory leaks?



What are dangling pointers? How are dangling pointers different from memory leaks?..

Answer / hrpynux@gmail.com

So dangling pointer is nothing but a pointer which is pointing a dynamic variable whose scope is already finished. Memory leak: When there is a memory area in a heap but no variable in the stack pointing to that memory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is a void pointer? When is a void pointer used?

0 Answers   Aspire, Infogain,


string reverse using recursion

0 Answers   Mind Tree,


What is the use of in c?

0 Answers  


main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??

19 Answers   EBS, Ramco, Sangwin, TCS,


How to write the code of the program to swap two numbers with in one statement?

2 Answers  






design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

0 Answers   TCS,


Tell me when would you use a pointer to a function?

0 Answers  


What is the c value paradox and how is it explained?

0 Answers  


What are header files? What are their uses?

0 Answers  


why java is called as a purely oops language.

3 Answers   TVS,


praagnovation

0 Answers  


how to display 2-D array elements in spiral

2 Answers  


Categories