Introduction
If you want to nullify the effect of the define directive and specify a new value, then you can use the undef directive.
Program
#include#define VAL 40; //A #undef VAL //B #define VAL 40 //C main() { printf ("%d\n", VAL); //D }
Explanation
-
Statement A defines VAL as 40, that is, an erroneous definition.
-
Statement B indicates that the afore mentioned definition no longer exists.
-
Statement C allows a new definition.
-
Statement D uses new definition of 40.
Point to Remember
The undef directive nullifies the effect of an earlier definition.
No comments:
Post a Comment