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 (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
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
 
what is c language.   3
what will be printed by this printf? printf("%c",printf("hi")["sharkselva"])); } HCL 3
where does malloc() function get the memory?   1
Is main() function predfined or userdefined?   11
What will be result of the following program? void myalloc(char *x, int n) { x= (char *)malloc(n*sizeof(char)); memset(x,\0,n*sizeof(char)); } main() { char *g="String"; myalloc(g,20); strcpy(g,"Oldstring"); printf("The string is %s",g); } a) The string is : String b) Run time error/Core dump c) The string is : Oldstring d) Syntax error during compilation e) None of these IBM 3
Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a)); printf("\nSize of 2.0 ::%d",sizeof(2.0));} IBM 11
how many error occurs in C language ? Wipro 22
Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + .. up to fifteen terms.   2
how can i get this by using for loop? * ** * **** * ****** Excel 3
can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?   2
WHAT IS LOW LEVEL LANGUAGE?   2
int x=sizeof(!5.856); What will value of variable x?   2
 
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