Write a program that reads a text file named as “input.txt” and performs the following operations: 1. Write each word in the text file in reverse order to the file named as “output.txt” . (Example: If the text file contains ”Hello World!”, then it should write to the output file ”olleH dlroW!”) 2. Print the number of words. 3. Print the number of words starting with a capital letter. 4. Print the number of words that contain no characters other than English letters. In this challenge you are supposed to: 1. Comment every function with a description explaining what it does and how it does it. 2. Research and learn how to read and write into text files by using proper library functions in C. In your program, you can assume that 1. Both the input file (input.txt) and the output file (output.txt) will be placed on the same folder as your program’s executable (.exe). 2. In the input file, the length of the words will be at most 100.
Write a program that reads a text file named as “input.txt” and performs the following operations:
1. Write each word in the text file in reverse order to the file named as
“output.txt” . (Example: If the text file contains ”Hello World!”, then it
should write to the output file ”olleH dlroW!”)
2. Print the number of words.
3. Print the number of words starting with a capital letter.
4. Print the number of words that contain no characters other than English
letters.
In this challenge you are supposed to:
1. Comment every function with a description explaining what it does and
how it does it.
2. Research and learn how to read and write into text files by using proper
library functions in C.
In your program, you can assume that
1. Both the input file (input.txt) and the output file (output.txt) will be
placed on the same folder as your program’s executable (.exe).
2. In the input file, the length of the words will be at most 100.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images