C - Predefined Macros Flashcards
(11 cards)
1
__LINE__ - Contains the current line number of the program during compilation
2
__FILE__ - Contains the current file name
3
__DATE__ - Contains the date at which the source code of a program is converted to object code
4
__TIME__ - Gives the time at which a program is compiled in hours:minutes:seconds
5
__STDC__ - Used to confirm the compiler standard. Generally holds the value 1, meaning that the compiler conforms to ISO Standard C.
6
__STDC_HOSTED__ - Holds the value 1 if the compiler’s target is a hosted environment, a facility in which a third-party holds the compilation data and runs the programs on its own computers. Generally, the value is set to 1.
7
__STDC_VERSION__ - This macro holds the C Standard’s version number in the form yyyymmL where yyyy and mm are the year and month of the Standard version. This signifies which version of the C Standard the compiler conforms to.
8
__cplusplus - Is defined when the C++ compiler is used. It is used to test whether a header is compiled by a C or C++ compiler.
9
__OBJC__ - Is defined when the Objective C compiler is used. It is used to test whether a header is compiled by a C or Objective C compiler.
10
__ASSEMBLER__ - Is defined with value 1 when preprocessing assembly language.
11
__func__ / __FUNCTION__ - Contains the name of the function that it is used in.