Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a c program. You must use EOF controlled loops Create a text file data.txt using the data shown below and then write a C
write a c program. You must use EOF controlled loops
Create a text file data.txt using the data shown below and then write a C program that reads the file data.txt character by character. It then displays the number of lines, number of digits, lowercase letters, uppercase letters, and other characters in an output file summary.txt as shown below Note: Character digits are represented internally as an interval with increasing characters from '0' to '9'. Thus, any character digit belongs to the interval [o,'9'1. The same applies for letters i.e. a lowercase letter belongs to the interval ['a','z'], and an uppercase letter belongs to the interva'A', Z']. Hint: Each line in a text-file, except the last line, is terminated by the new line character n Input file: data.txt kadFath%&5453 as 000769 1290*&aBgKM+ 234 Output file: summary.txt Number of lines-4 Number of lowercase letters 10 Number of uppercase letters4 Number of digits 13 Number of other characters 12 Note: The new line character 'n' should not be counted in other characters. When you create the input file make sure it does not have an extra blank line at the endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started