#include <stdio.h>
#ifdef _WIN32
#define NULL_DEVICE "NUL:"
#define TTY_DEVICE "COM1:"
#else
#define NULL_DEVICE "/dev/null"
#define TTY_DEVICE "/dev/tty"
#endif
int main() {
printf("hello!\n");
freopen(NULL_DEVICE, "w", stdout);
freopen(NULL_DEVICE, "w", stderr);
printf("you CAN'T see this stdout\n");
fprintf(stderr, "you CAN'T see this stderr\n");
freopen(TTY_DEVICE, "w", stdout);
freopen(TTY_DEVICE, "w", stderr);
printf("you CAN see this stdout\n");
fprintf(stderr, "you CAN see this stderr\n");
return 0;
}