File I/O Streams in C Programming Language :
- In C all input and output is done with streams
- Stream is nothing but the sequence of bytes of data
- A sequence of bytes flowing into program is called input stream
- A sequence of bytes flowing out of the program is called output stream
- Use of Stream make I/O machine independent.
Predefined Streams :
- stdin
- stdout
- stderr
Standard Input Stream Device :
- stdin stands for (Standard Input)
- Keyboard is standard input device .
- 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.
Standard Output Stream Device :
- stdout stands for (Standard Output)
- Screen(Monitor) is standard input device .
- Standard output is data (Often Text) going out from a program.
- The program sends data to output device by using write operation.
Some Important Summary :
| Point | Input Stream | Output Stream |
|---|---|---|
| Standard Device 1 | Keyboard | Screen |
| Standard Device 2 | Scanner | Printer |
| IO Function | scanf,gets | printf,puts |
| IO Operation | Read | Write |
| Data | Data goes from stream | data comes into stream |


