Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED THIS IN C++ You are required to open an input file (shown below) then read one character at a time until all characters

I NEED THIS IN C++ You are required to open an input file (shown below) then read one character at a time until all characters in the file are all read. While reading the content of the file, keep a count of the following: 1) Count of each digit read. The counts should be kept in an int array of size 10. 2) Count of each alphabetic character read irrespective if it is an upper case or lower case. The counts should be kept in an int array of size 26. 3) Count of whitespace characters. A whitespace includes the blank (space) , new line character , tab character \t, form feed \f, Vertical tab \v and carriage return . 4) Count of all other characters not alphabetic, not a digit and not a whitespace. 5) Total count of all characters read. After reading and processing the file, and get each count correctly, you will display each letter of alphabet and its count, each digit and its count, count of whitespaces and all other counts. Your solution must use FUNCTIONAL DECOMPOSITION. Hence, if the input file was the one given below, your unsorted output is shown below. Please note that your output must also has the values sorted in numerical order from lowest to highest. Here is the content of your input file.image text in transcribed

Here will be the output generated.

image text in transcribed

main.cpp source.tx The quick brown fox jumps over the lazy dog

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions