- File Content Reverse Display
Write a program that reads a file containing a series of strings and displays the content of the file in reverse order, starting from the last line to the first.
- File Tail Display
Write a program that asks the user for the name of a file and displays the last five lines of the file’s contents. If the file contains less than five lines, it should display the file’s entire contents.
- Word Counter
Write a program that asks the user for the name of a file. The program should read the file and display the total number of words in the file.
- Vowel Counter
Assume a file containing a series of strings is named and exists on the computer’s disk. Write a program that counts the number of vowels (a, e, i, o, u) in the file and displays the count.
- Character Frequency
Write a program that asks the user for the name of a file. The program should read the file and display the frequency of each character in the file.
- Word Frequency
Write a program that asks the user for the name of a file. The program should read the file and display the frequency of each word in the file.
- Longest Line
Write a program that asks the user for the name of a file. The program should read the file and display the longest line in the file.
- Unique Words
Write a program that asks the user for the name of a file. The program should read the file and display all unique words in the file.
- Duplicate Line Removal
Write a program that asks the user for the name of a file. The program should read the file and create a new file that contains the same content but with all duplicate lines removed.
- File Content Search
Write a program that asks the user for the name of a file and a search term. The program should read the file and display all lines that contain the search term.