C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// gets system and compiler info w/ predefined macros
#include <stdio.h>
int main() {
#ifdef __linux__ // linux
printf("linux\n");
#elif _WIN32
printf("win\n");
#elif __APPLE__
printf("apple\n");
#else
printf("?????\n");
#endif
printf("compiler version: %s\n", __VERSION__);
printf("compiler version (stdc); %s\n", __STDC_VERSION__);
printf("date: %s\n", __DATE__);
printf("time: %s\n", __TIME__);
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run