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 |
How to find the given no is odd or even without checking of any condition and loops. (Hint: Using array)
How we can set and clear bit in a byte using macro function?
What are the application of void data type in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
What functions are used for dynamic memory allocation in c language?
#include<stdio.h> void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; printf("%d\t%d\t%d",a,b,c); }
how to find a 5th bit is set in c program
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
What are formal parameters?
Can a local variable be volatile in c?