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

What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?

2 Answers  


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,


All technical questions

0 Answers   TCS,


Explain union.

0 Answers  


define string ?

0 Answers  


Can math operations be performed on a void pointer?

0 Answers  


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

0 Answers   Amazon,


Explain what are the advantages and disadvantages of a heap?

0 Answers  


What is the OOPs concept?

3 Answers  


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

0 Answers  


What is function in c with example?

0 Answers  


Which is better oop or procedural?

0 Answers  


Categories