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  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
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
write a program that explain #define and # undef directive
 Question Submitted By :: Zahra
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a program that explain #define and # undef directive
Answer
# 1
The following code snippet explain the use of #define and
#undef preprorcessor directives.

/* define our own value of NULL */
#ifdef NULL
#undef NULL      /* if NULL is already defined, then
undefine it */
#define NULL ((void*)0)    /* define our own version of NULL
#endif
 
Is This Answer Correct ?    1 Yes 0 No
Ravi Joshi
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.  4
C program to find frequency of each character in a text file?  3
what is the difference between const volatile int i & volatile const int j; HCL2
Given an unsigned integer, find if the number is power of 2?  4
#define f(x) main() { printf("\n%d",f(2+2)); }  3
what is link list?  2
WHAT IS THE DIFFERANCE BITWIN GETS();AND SCANF();  2
can we write a program in c for printf and scanf without using header file stdio.h  1
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup7
how to find the kth smallest element in the given list of array elemnts. Silicon5
what is the use of pointers  5
why you will give me a job in TCS. TCS5
give one ip, find out which contry Google4
how to find that no is int or float?  5
actually i have 2 years teaching experience as computer faculty but now i am a DBA but when i go for interview many peoples asked me why i left my teaching profession and why i want to come in this field kindly give me the proper answer of this queston  1
How the C program can be compiled? HP7
Hi, main() { } Is a user defined function or Built in Functionn Honeywell9
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture3
Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a)); TCS4
how to find a 5th bit is set in c program IBM3
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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