C program to print contents in reverse order of a file (just like TAC command in Linux)
This program will print the contents of given file name in reverse order. Just like tac command in Linux. tac command displays contents of the file in reverse order. Same as tac command in this program you have to supply file name.
The syntax of executing this program
./program-name file-name
C program to print contents in reverse order of a file
linux tac command implementation
Actual file contents:
This is line1.
This is line2.
This is line3.
This is line4.
This is line5.
This is line6.
Output
need an explanation for this answer? contact us directly to get an explanation for this answer