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
regarding pointers concept
How can I open files mentioned on the command line, and parse option flags?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What are the rules for the identifier?
Compare interpreters and compilers.
Which is an example of a structural homology?
what are # pragma staments?
When should a type cast not be used?
what is event driven software and what is procedural driven software?
What is %d used for?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Explain what are global variables and explain how do you declare them?
What is actual argument?
How are 16- and 32-bit numbers stored?
Are the variables argc and argv are local to main?