ALLInterview.com :: Home Page KalAajKal.com
 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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what is the difference between NULL & NUL keywords in C?
 Question Submitted By :: Uttama
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the difference between NULL & NUL keywords in C?
Answer
# 1
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 ?    0 Yes 2 No
Abhijit
 
  Re: what is the difference between NULL & NUL keywords in C?
Answer
# 2
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 ?    0 Yes 1 No
Bryan Olson
 
 
 
  Re: what is the difference between NULL & NUL keywords in C?
Answer
# 3
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 ?    1 Yes 1 No
Shriku322
[IFlex]
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What is sparse file?  1
what is the use of call back function in c?tell me with example  1
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen) NetApp1
what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these IBM2
how to sort two array of characters and make a new array of characters. Accenture1
how the size of an integer is decided? - is it based on processor or compiler or OS? nvidia11
#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code? Ramco4
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup5
In scanf h is used for BFL2
What is the purpose of Scanf Print, getchar, putchar, function?  1
How to receive strings with spaces in scanf()  3
who did come first hen or agg Infosys8
how many times of error occur in C  7
Software Interview Questions CAT1
int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ? Mascot5
52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?  3
What is an object?  2
hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES Wipro2
How does C++ help with the tradeoff of safety vs. usability?  1
Can you think of a way when a program crashed before reaching main? If yes how?  2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com