#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%s\n", __FILE__);
printf("%s\n", __FUNCTION__);
printf("%s\n", __func__);
printf("%d\n", __LINE__);
printf("%d\n", __LINE__);
printf("%s\n", __DATE__);
printf("%s\n", __TIME__);
char buf[100];
sprintf(buf, "%s : %s() : %d", __FILE__, __FUNCTION__, __LINE__);
puts(buf);
return 0;
}
[root@lwh TheSwordRefersToOffer]
[root@lwh TheSwordRefersToOffer]
test.c
main
main
11
12
Oct 9 2020
22:06:57
test.c : main() : 18
[root@lwh TheSwordRefersToOffer]