what is the difference between NULL and NUL ………………..??????
what is the difference between NULL and NUL ………………..??????
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.
NUL : A Character in the ASCII set with an ASCII value of 0. Used as a Control character or a String Terminator to indicate the End of Strings.
NULL : It is an Address. It is used to Initialize pointers to indicate that the Pointer does not point to a Valid Object.
Try this :
int main()
{
printf(“%d %d”,sizeof(“”),sizeof(NULL));
}
More information can be found here :
http://en.wikipedia.org/wiki/Null_character
http://en.wikipedia.org/wiki/Null_pointer#Null_pointer
NULL is a macro defined in the header file for NULL POINTER
while NUL is the name of first character in ASCII table that corresponds to the 0 decimal value.