This tag is for questions regarding "Standard I/O", i.e. I/O using the facilities in the C header
The C standard header <stdio.h>
defines facilities for using data streams via FILE
objects and also declares the pre-defined standard streams, stdin
, stdout
and stderr
.
The standard IO streams can be used from C in two ways:
- Using standard IO streams as implemented by the standard header
<stdio.h>
e.g.fprintf (stdout, "hello, world\n");
- Using the underlying file descriptors directly using the facilities in
<unistd.h>
e.g.write (STDOUT_FILENO, "hello, world\n", 13);
. Note that this is not ISO C, but POSIX.