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
what is the structure pointer?
What is null in c?
Can we initialize extern variable in c?
What are the rules for identifiers in c?
What is a scope resolution operator in c?
Which is best linux os?
Is null equal to 0 in sql?
Why do we use int main?
Is that possible to store 32768 in an int data type variable?
What are the different types of endless loops?
Why doesnt long int work?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What is difference between arrays and pointers?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.