C define Macro
This section illustrates you how to use macros in C.
Macros are the identifiers that represent statements or expressions. To associate meaningful identifiers with constants, keywords, and statements or expressions, #define directive is used. You can see in the given example, we have define a macro i.e SQUARE(x) x*x. Here the macro determines the square of the given number.
Macro Declaration: #define name text
Here is the code:
DEFINEMA.C
#include <stdio.h>
|
Output will be displayed as:
DEFINEMA.EXE