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
|
JavaTpoint offers too many high quality services. Mail us on [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