224k views
1 vote
Write a program that prints out the last few lines of a file. The program should be efficient, in that it seeks to near the end of the file, reads in a block of data, and then goes backwards until it finds the requested number of lines; at this point, itshould print out those lines from beginning to the end of the file. To invoke the program, one should type: mytail -n file, where nis the number of lines at the end of the file to print.

User Ironpaw
by
7.3k points

1 Answer

3 votes

Answer:

is this a project?

Step-by-step explanation:

User Itanex
by
7.3k points