what is the difference between NULL & NUL keywords in C?

Answer Posted / shriku322

NULL is a macro defined in for the null pointer.
NUL is the name of the first character in the ASCII
character set. It corresponds to a zero value. There's no
standard macro NUL in C, but some people like to define it.
The digit 0 corresponds to a value of 80, decimal.
Don't confuse the digit 0 with the value of '' (NUL)!
NULL can be defined as ((void*)0), NUL as ''.

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the correct declaration of main?

887


Define Array of pointers.

816


How to declare pointer variables?

884


Tell us something about keyword 'auto'.

831


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2074


what is the function of pragma directive in c?

869


What is the size of structure in c?

886


What is register variable in c language?

803


What are loops in c?

758


What are the differences between new and malloc in C?

795


Explain what are the different data types in c?

930


What are the advantages of using macro in c language?

795


What are the 5 data types?

768


Why double pointer is used in c?

756


Explain the term printf() and scanf() used in c language?

795