Standard Streams - Standard Input (stdin)

Standard Input (stdin)

Standard input is data (often text) going into a program. The program requests data transfers by use of the read operation. Not all programs require input. For example, the dir or ls program (which displays file names contained in a directory) performs its operation without any stream data input.

Unless redirected, input is expected from the keyboard which started the program.

The file descriptor for standard input is 0 (zero); the POSIX definition is STDIN_FILENO; the corresponding variable is FILE* stdin; similarly, the variable is std::cin.

Read more about this topic:  Standard Streams

Famous quotes containing the words standard and/or input:

    As long as male behavior is taken to be the norm, there can be no serious questioning of male traits and behavior. A norm is by definition a standard for judging; it is not itself subject to judgment.
    Myriam Miedzian, U.S. author. Boys Will Be Boys, ch. 1 (1991)

    Family life is not a computer program that runs on its own; it needs continual input from everyone.
    Neil Kurshan (20th century)