Standard File Input-Output Streams in C Programming

February 3, 2012 No Comments » Hits : 289





File I/O Streams in C Programming Language :

  1. In C all input and output is done with streams
  2. Stream is nothing but the sequence of bytes of data
  3. A sequence of bytes flowing into program is called input stream
  4. A sequence of bytes flowing out of the program is called output stream
  5. Use of Stream make I/O machine independent.

Predefined Streams :

  1. stdin
  2. stdout
  3. stderr
Standard Input and Output Streams in C Programming

Standard Input Stream Device :

  1. stdin stands for (Standard Input)
  2. Keyboard is standard input device .
  3. Standard input is data (Often Text) going into a program.
  4. The program requests data transfers by use of the read operation.
  5. Not all programs require input.

Standard Output Stream Device :

  1. stdout stands for (Standard Output)
  2. Screen(Monitor) is standard input device .
  3. Standard output is data (Often Text) going out from a program.
  4. The program sends data to output device by using write operation.

Some Important Summary :

PointInput StreamOutput Stream
Standard Device 1KeyboardScreen
Standard Device 2ScannerPrinter
IO Functionscanf,getsprintf,puts
IO OperationReadWrite
DataData goes from streamdata comes into stream

Incoming search terms: