What is Difference between null macro and null pointer?

Using a NULL macro to make C portable

I'll assume that you're asking your question for C type language programming. A NULL pointer is a pointer that's guarnteed to point to nothing. This may be 0 in a UNIX/Linux system or some other address in another system. Using the NULL macro to set/initialize your pointers will make your programs more portable among systems than using something like the 0.

#include <stdio.h>

char *c = 0; // initialize to NULL--not portable
char *p = NULL; // initialize to NULL as defined in stdio is portable

Improve Answer Discuss the question "What is Difference between null macro and null pointer?" Watch Question

First answer by ID1247666205. Last edit by ID1247666205. Question popularity: 20 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > What is Difference between null macro and null pointer?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Null pointer in c?  What is null in c?  What is null macro?  Nullmacro null pointer?  Definition of null macro?  'Null Pointer Assignment?  29 what is a NULL Pointer?  Is NULL always defined as 0?  Null macro and null pointer?  Difference between NULL and NUL?  Difference of a NULL pointer and a NULL macro?  Difference between null Macro and null pointer?  Difference between Null pointer null character?  Difference between null pointer and null macro?  Difference between null pointer and void pointer?  Difference between a null pointer and a null macro?  Is NULL pointer and uninitialized pointers are same?  What is difference between null pointer and null macro?  What is the difference between null macro and null pointer?  Whether a NULL pointer is same as an uninitialized pointer?