Encyclopedia > Standard input

  Article Content

Standard streams

Redirected from Standard input

The standard streams are a set of input and output channels featured in Unix and Unix-like operating systems. They consist of three channels through which data can be passed to or from a program:

Table of contents

Standard input Standard input is the input stream into which text or other data can be entered into a program. Certain programs will, by default, use the standard input stream as a data source if not given a file to use as input.

Standard output Standard output is the output stream into which data is written from a program. Data written to standard output is usually written to the screen unless redirected. It is intended to be the used as the default output stream.

Standard error Standard error is the output stream used by programs for outputting error messages[?] or other diagnostics[?]. It is a separate stream from standard output and can be redirected separately from it.

Relevance to the C programming language The C standard library[?] header file <stdio.h> defines three variables of type FILE * which programs can use to access the standard streams. They are named 'stdin', 'stdout' and 'stderr' respectively.

When running programs from a terminal, standard input is taken from the keyboard, while standard output and error will appear on the screen.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Grateful Dead

... Grateful Dead were an American rock band, which was formed in the mid 1960s in San Francisco from the remnants of another band, Mother McCree's Uptown Jug Champions. In ...

 
 
 
This page was created in 26.8 ms