Difference between null pointer and dangling pointer?
Answer Posted / ravi
Both are very different.
NULL macro is
#define NULL 0
it means the macro NULL will be replaced by 0 while
preprocessing
But the NULL pointer means it points to nowhere i.e. contains 0.
It contains 0 means it may be dangerous to use such pointer
without assigning proper address to it otherwise NULL
pointer may try to access reset address may cause the
program to crash.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is string constants?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Which type of language is c?
Does sprintf put null character?
Differentiate between the expression “++a” and “a++”?
What is New modifiers?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is the purpose of main( ) in c language?
Can math operations be performed on a void pointer?
What are the applications of c language?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
How can I change the size of the dynamically allocated array?
What are types of preprocessor in c?
explain what are actual arguments?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..