ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2266)
 C++ interview questions  C++ Interview Questions (1121)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (652)
Question
what is the difference between NULL & NUL keywords in C?
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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 ?    18 Yes 3 No
Shriku322
 
Answer
# 2
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 ?    16 Yes 5 No
Abhijit
 
 
 
Answer
# 3
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 ?    5 Yes 9 No
Bryan Olson
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST Adobe 6
What character terminates all strings composed of character arrays? 1) 0 2) . 3) END   3
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ? NetApp 4
How can you print HELLO WORLD without using "semicolon"? HCL 7
Write a program which take a integer from user and tell whether the given variable is squar of some number or not. eg: is this number is 1,4,9,16... or not Alcatel 9
What is the difference between getch() and getche()?   1
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4 Mascot 2
what are the stoge class in C and tel the scope and life time of it? Tech-Mahindra 2
what is the use of call back function in c?tell me with example BOSCH 2
what is difference between array and structure? TCS 43
write a program to arrange the contents of a 1D array in ascending order   4
out put of printf(%d,printf(ram));   5
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com