Counting the character occurrences in a file For this task you are asked to write a program that will open a file called “story.txt" and count the number of occurrences of each letter from the...


please could you help me in this assignment, we are using

c language, not C++, we not allowed to use string or functions that using string, we allowed using character and arrays if we will use functions we should creat them loops if statements... and thank you very much ^^


Counting the character occurrences in a file<br>For this task you are asked to write a program that will open a file called “story.txt

Extracted text: Counting the character occurrences in a file For this task you are asked to write a program that will open a file called “story.txt" and count the number of occurrences of each letter from the alphabet in this file. At the end your program will output the following report: Number of occurrences for the alphabets: a was used – times. b was used – times. c was used – times .and so, on Assume the file contains only lower-case letters and for simplicity just a single paragraph. Your program should keep a counter associated with each letter of the alphabet (26 counters) [Hint: Use array] Your program should also print a histogram of characters count by adding a new function print Histogram (int counters []). This function receives the counters from the previous task and instead of printing the number of times each character was used, prints a histogram of the counters. An example histogram for three letters is shown below) [Hint: Use the extended asci character 254]: C:\WINDOWS\system32\cmd.exe a Press any key to continue

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here