| |
GeekInterview.com > Interview Questions > Programming > C
| Print | |
Question: What is a null macro?
What is the differtents between a null pointer and a null macro?
What is near, far and huge pointer?
How many bytes are occupied by them?
How would you obtain segment and offset addresses from a far address of a memory location?
|
| May 05, 2008 21:41:41 |
#5 |
| vivianyang |
Microsoft Expert Member Since: May 2008 Total Comments: 1 |
RE: What is a null macro? What is the differtents between a null pointer and a null macro?What is near, far and huge pointer? How many bytes are occupied by them?How would you obtain segment and offset addresses from a far address of a memory location? |
A null pointer should not be confused with an uninitialized pointer: a null pointer is guaranteed to compare unequal to any valid pointer, whereas depending on the language and implementation an uninitialized pointer might have either an indeterminate (random or meaningless) value or might be initialised to an initial constant (possibly but not necessarily NULL).
In C and C++ programming, two null pointers are guaranteed to compare equal; ANSI C guarantees that any NULL pointer will be equal to 0 in a comparison with an integer type. |
| |
Back To Question | |