Read series name and write in reverse order using I/O redirection and pipes in C++ Programming Language
Write a C++ program to read a series of names, one per line, from standard input and write these names spelt in reverse order to the standard output using I/O redirection and pipes. Repeat the exercise using an input file specified by the user instead of the standard input and using an output file specified by the user instead of the standard output.
At first, we will ask the user to enter a string. This will be our Standard Input.
And we will present options such as the followings:
And depending on the user’s choice the code will execute the output of the respective function.