detect operating system c
snippet in c
detect operating system c
user2301
#include <stdio.h>
int main() {
#ifdef _WIN32
printf("you are working on a Windows OS.\n");
#elif __APPLE__
printf("you are working on a Mac OS.\n");
#elif __linux__
printf("you are working on a Linux OS.\n");
#else
printf("Sorry, the system are not listed above.\n");
#endif
return 0;
}