Read in a file, reverse string, print on multiple lines base on command prompt entry
I need to be able to read in a file, and reverse the words (mirror writing), based on what is entered on the command prompt. The data can be either left-aligned, centered, or right-aligned.
For Example:
I have a file called reverse.txt that holds the following line:
The quick green owl flies over the small old cat.
So, if in the command prompt entry is:
./reverse.c reverse.txt L15
The output needs to look like this....
neerg kciuq ehT
revo seilf lwo
dlo ynit eht
.tac
Any help will be greatly appreciated.