what is the difference between NULL & NUL keywords in C?
Answers were Sorted based on User's Feedback
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 |
Answer / abhijit
NULL is a macro defined in <stddef.h> for the null pointer.
<br>NUL is the name of the first character in the ASCII
character set. It corresponds to a zero value. There?s no
<br>standard macro NUL in C, but some people like to define
it. <br>The digit 0 corresponds to a value of 80, decimal.
Don?t confuse the digit 0 with the value of ?? (NUL)!
<br>NULL can be defined as ((void*)0), NUL as ??. <br>
? NewInterviewQuestions.com
| Is This Answer Correct ? | 17 Yes | 5 No |
Answer / bryan olson
Neither NULL nor NUL is a keyword in C.
[International Standard ISO/IEC 9899:1999, Programming
Languages -- C, Section 6.4.1 Keywords]
That said, Abhijit did a good job explaining them.
| Is This Answer Correct ? | 6 Yes | 9 No |
Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;
In which header file is the null macro defined?
Explain how can I pad a string to a known length?
Describe the header file and its usage in c programming?
Explain what is operator promotion?
what are the difference between ANSI C and Let Us c and Turbo C
all c language question
Is it possible to run a c program without using main?If yes HOW??
Is there any book to know about Basics of C Language?
how can i sort numbers from ascending order and descending order using turbo c..
Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
Is calloc better than malloc?