I use the write syscall using the unistd.h header to send text to stdout. AFAIK, the numeric value of stdout is 1. So why can't I use stdout instead of 1 as the first argument of write?
#include <unistd.h> // write
#include <stdio.h> // stdout
int main(void)
{
write(stdout, "This will be output to standard out\n", 36);
return 0;
}
Google said: Standard output value stdout. Its value is 1.