CKTIS / C
stdout: the standard output stream
stdout denotes a C program’s standard output stream. Its characters may go to a terminal, a file, or another destination.
Version: C23
Syntax
FILE * stream = stdout;<stdio.h> exposes stdout as an expression of pointer-to-FILE type. FILE represents a stream managed by the library; it is not a string or the contents of a file. printf writes to stdout by default, while fprintf(stdout, ...) selects that stream explicitly.
Standard output can be buffered. Writing to the stream does not guarantee that characters immediately appear on screen. A newline can flush a line-buffered stream, but this is not a general guarantee for every redirection. fflush(stdout) requests delivery of buffered output to the host environment and can report an error.
stderr is a separate stream typically used for diagnostics, and stdin provides input. Keeping them separate lets a caller redirect results without mixing in error messages. The example does not open a file on your device: it writes to the existing standard output stream.
Examples
#include <stdio.h>
int main(void) {
fprintf(stdout, "%s\n", "CKTIS");
return 0;
}
Result
CKTIS