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
In a byte, what is the maximum decimal number that you can accommodate?
What is break in c?
Which is an example of a structural homology?
What are the different data types in C?
what is the significance of static storage class specifier?
Write a program with dynamically allocation of variable.
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is pre-emptive data structure and explain it with example?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Is it possible to have a function as a parameter in another function?
Explain the use of #pragma exit?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What is array in c with example?
What does s c mean in text?