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

Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

0 Answers  


What is clrscr in c?

0 Answers  


What is the use of pragma in embedded c?

0 Answers  


is it possible to change the default calling convention in c ?

1 Answers   Aptech,


write a program to generate 1st n fibonacci prime number

2 Answers  






#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }

12 Answers   Capital IQ, Sasken,


What is pointers in c?

0 Answers  


Explain what are header files and explain what are its uses in c programming?

0 Answers  


What are control structures? What are the different types?

0 Answers  


what is the difference between embedded c and turbo c ?

1 Answers  


Write a C program in Fibonacci series.

0 Answers   iNautix,


Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.

11 Answers   Microsoft,


Categories