This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science.
Somewhere in the first lectures of a programming basics course, we are shown how to take input and show output on the terminal. That’s called standard input/output or just Standard IO for short.
So, in C# we have Console.WriteLine and Console.ReadLine.
In C++, we have cin and cout.
All these things are associated with the topic of Standard IO. And what they tell us is that the standard input is the keyboard and the standard output is the screen. And for the most part, that is the case.
But what we don’t get told is that the Standard IO can be changed. There is a way to accept input from a file and redirect output to another file. No, I’m not talking about writing code to read/write files. I am talking about using the Standard IO for the job, via the terminal.