I need to do this:
$ ./compiledprog.x < inputValues > outputFile
so that I read from the file inputValues which for our case might just be \n separated int values or whatever. Then anything printf()‘d goes into outputFile. But what’s this called, technically speaking, and where can I find a demo of doing this.
As noted by others, it’s input/output redirection.
Here’s an example program that would copy the standard input to the standard output, in your example copy the contents from inputValues to outputFile. Implement whatever logic you want in the program.
Note: this is quick and dirty code, which expects a well behaved file as input. A more detailed error checking could be added.