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:

    “There is a certain standard of grace and beauty which consists in a certain relation between our nature, such as it is, weak or strong, and the thing which pleases us. Whatever is formed according to this standard pleases us, be it house, song, discourse, verse, prose, woman, birds, rivers, trees, room, dress, and so on. Whatever is not made according to this standard displeases those who have good taste.”
    —Blaise Pascal (1623–1662)

    “Celebrity is a mask that eats into the face. As soon as one is aware of being “somebody,” to be watched and listened to with extra interest, input ceases, and the performer goes blind and deaf in his overanimation. One can either see or be seen.”
    —John Updike (b. 1932)