[prev] [index] [next]

Streams

Input/output to/from programs occurs via streams
  • a stream is a sequence of byte data
  • can be read-from or written-to depending on mode
All input/output in programs so far ...
  • is via standard input/output streams
  • keyboard is default standard input stream (stdin)
  • screen is default standard output stream (stdout)
  • stdin/stdout can be connected to files (using < and >)