Home > Electronics Tutorials > C Language Tutorial > Preprocessing Directives - Predefined Macros

C Language Programming Library Reference Guide

Preprocessing Directives - Predefined Macros

The following macros are already defined by the compiler and cannot be changed.

 

__LINE__ A decimal constant representing the current line number.
__FILE__ A string representing the current name of the source code file.
__DATE__ A string representing the current date when compiling began for the current source file. It is in the format "mmm dd yyyy", the same as what is generated by the asctime function.
__TIME__ A string literal representing the current time when cimpiling began for the current source file. It is in the format "hh:mm:ss", the same as what is generated by the asctime function.
__STDC__ The decimal constant 1. Used to indicate if this is a standard C compiler.
Note: To report broken links or to submit your projects, tutorials please email to Webmaster

Discover

     more......