91-9990449935 0120-4256464 |
C MacrosA 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:
Object-like MacrosThe 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. Function-like MacrosThe 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 MacrosANSI C defines many predefined macros that can be used in c program.
C predefined macros exampleFile: simple.c Output: File :simple.c Date :Dec 6 2015 Time :12:28:46 Line :6 STDC :1
Next TopicC #include
|