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
Explain how do you view the path?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How do I determine whether a character is numeric, alphabetic, and so on?
Why we use int main and void main?
What is the difference between c &c++?
Why does the call char scanf work?
What are structure members?
What is difference between %d and %i in c?
Differentiate abs() function from fabs() function.
Add Two Numbers Without Using the Addition Operator
What are the benefits of organizational structure?
Explain the advantages and disadvantages of macros.
Can math operations be performed on a void pointer?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
How can you find out how much memory is available?