A macro is a segment of code which is replaced by the value of macro. Macro is defined by #define directive. There are two types of macros:
The object-like macro is an identifier that is replaced by value. It is widely used to represent numeric constants. For example:
Here, PI is the macro name which will be replaced by the value 3.14.
The function-like macro looks like function call. For example:
Here, MIN is the macro name.
Visit #define to see the full example of object-like and function-like macros.
C Predefined Macros
ANSI C defines many predefined macros that can be used in c program.
C predefined macros example
File :simple.c Date :Dec 6 2015 Time :12:28:46 Line :6 STDC :1