63 076
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #16271 in C++ for davood farajzade

Question #16271
Write a c++ program that confirms this phenomenon. Your program will be invoked from the command line like this:
C:\mydir> freqCount avonlea.txt avonlea.rept -all
It will then read through the first text file on the command line (in this case "avonlea.txt")
accumulating the counts for each letter. When it reaches the end of the file, it will write a report (in this case "avonlea.rept") that displays the total number of alphabetic characters "azA- Z" and for each character the number of times it occurred and the relative frequency with which it occurred. In counting characters, regard lower case "a-z" and upper case "A-Z" characters as identical.
You will need an array of 26 long integers, one per character. To increment the count for a
particular character you will have to convert it into an index in the range 0..25. Do this by first determining which range the character belongs in:"a-z" or "A-Z" and then subtracting 'a' or 'A' from it, as appropriate:
int inx = (int)ch - (int)'A' ;
count[inx]++ ;
Expert's answer
Unfortunately, your question requires a lot of work and cannot be done for free.
Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions