Lesson 2.2 Input and Output Operations

Cards (3)

  • Input Stream:
    • Direction of flow of bytes is from the device (e.g., Keyboard) to the main memory
    • Process is called input
  • Output Stream:
    • Direction of flow of bytes is opposite, from main memory to device (display screen)
    • Process is called output
  • Header files available in C++ for Input/Output operations:
    • iostream: contains definitions of objects like cin, cout, cerr
    • iomanip: used for manipulating streams, contains definitions of setw, setprecision
    • fstream: describes file stream, used for handling data read from or written into a file
    • bits/stdc++: includes every standard library, used to reduce time wasted in tasks, especially when time-sensitive