C #ifdefThe #ifdef preprocessor directive checks if macro is defined by #define. If yes, it executes the code otherwise #else code is executed, if present. Syntax: Syntax with #else: C #ifdef exampleLet's see a simple example to use #ifdef preprocessor directive. Output: Value of a: 2 But, if you don't define NOINPUT, it will ask user to enter a number. Output: Enter a:5 Value of a: 5
Next TopicC #ifndef
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week