Javatpoint Logo
Javatpoint Logo

C #ifndef

The #ifndef preprocessor directive checks if macro is not defined by #define. If yes, it executes the code otherwise #else code is executed, if present.


Syntax with #else:

C #ifndef example

Let's see a simple example to use #ifndef preprocessor directive.


Enter a:5
Value of a: 5

But, if you don't define INPUT, it will execute the code of #ifndef.


Value of a: 2
Next TopicC #if

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA