write a program that explain #define and # undef directive



write a program that explain #define and # undef directive..

Answer / ravi joshi

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 ?    3 Yes 2 No

Post New Answer

More C Interview Questions

The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


I came across some code that puts a (void) cast before each call to printf. Why?

0 Answers  


Explain modulus operator. What are the restrictions of a modulus operator?

0 Answers  


what is the difference between embedded c and turbo c ?

1 Answers  


What is a void * in c?

0 Answers  






general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

0 Answers  


what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }

6 Answers   Microsoft,


what is a headerfile?and what will be a program without it explain nan example?

6 Answers   Assurgent,


What is string constants?

0 Answers  


Can we increase size of array in c?

0 Answers  


What are local and global variables?

3 Answers  


using for loop sum 2 number of any 4 digit number in c language

0 Answers  


Categories