adspace


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


Please Help Members By Posting Answers For Below Questions

In C programming, how do you insert quote characters (‘ and “) into the output screen?

1609


How do you convert strings to numbers in C?

1340


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1295


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1995


Differentiate between null and void pointers.

1253


ATM machine and railway reservation class/object diagram

5333


Do you know the difference between malloc() and calloc() function?

1131


What is the difference between union and anonymous union?

1395


What is pointer to pointer in c with example?

1195


What is pointers in c with example?

1165


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1179


What are pointers? What are different types of pointers?

1261


will u please send me the placement papers to my mail???????????????????

1920


Is int a keyword in c?

1055


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

2256