Saturday, January 22, 2011

define() preprocessor operator in c



define() preprocessor operator in c


#include

#define ABC 25

#if defined(ABC)

#define ABC 50

#undef ABC

#endif

int main(){

printf("%d",ABC+ABC);

return 0;

}








Output: Compilation error

No comments:

Post a Comment