Predefined Identifier and Macros Example

#include <stdio.h>

void main() {
	// The compiler supports this predefined identifier specified by ISO C99 and C++11.
	printf("__FUNCTION__\t: %s\n", __FUNCTION__);

	// The compiler supports these predefined macros specified by the ISO C99 and C++14 standards.
	printf("__DATE__\t: %s\n", __DATE__);
	printf("__TIME__\t: %s\n", __TIME__);
	printf("__FILE__\t: %s\n", __FILE__);
	printf("__LINE__\t: %d\n", __LINE__);
}
__FUNCTION__    : main
__DATE__        : Aug 30 2017
__TIME__        : 21:01:11
__FILE__        : main.cpp
__LINE__        : 11


References