counting the number of times each character occurs in a .txt file

This project will “analyze” the input data (a file of characters) and count the number of each character in the file.

You have one input file, data.txt. Make sure that your file has a newline character after the last (visible) character entered in each file. The file will be attached to this project bid.

Each file contains text. You do not know how many characters appear in each file, but any character listed in the ASCII table is possible. (You can ignore space characters.)

At the end of the file, your program should show the 5 most common characters in the file, and the count and percentages of those 5 characters. This output should be formatted in columns, as shown in the sample output below. Also, list the “printing” characters which were never used in the file. (“Printing characters” are numbered from 33 to 126 in the ASCII table. You should ignore other characters.)This project requires you to use at least 2 functions in addition to the main() function.

If you could use “casting” variables from char to int (“int(ch)”) or from int to char (“char(x)” that would be great!

you can only use:

if statements, loops, nested loops, functions,arrays, and switch statements.


the headers should only be #include<iostream>, #include<fstream>, using namespace std; Then your 2 function declarations. Then the main(). Then the 2 function definitions.

The way the output should look is attached and the txt file is also.

If you use Linux and cannot open the word document, then go to [url removed, login to view]

The picture of how the final output should look is there.

Skills: C Programming

See more: count times character occurs file, number times character count, program counting number times character occurs text file, find number times occurs file, count number character file, txt 2 jpg, std list c, std list, project casting, open table com, number function, function number, could of, count number character, will find number times character occurs file, count times number appear file, num character file, counting number characters, vector functions find number times number occurs, counting number times number occurs list, code number times character shows, count number times number occurs array, counting number certain character file, counting number certain character array, counting times number occurs

About the Employer:
( 6 reviews ) Tuscaloosa, United States

Project ID: #235145

Awarded to:


I can do this in minutes and 'm happy to help you.

$30 USD in 1 day
(3 Reviews)

6 freelancers are bidding on average $30 for this job


Dear sir, I am very interested in your project, Please see PMB for more details. Thanks. Best Regards.

$30 USD in 0 days
(55 Reviews)

I can do it well. Please check the PM.

$30 USD in 1 day
(4 Reviews)

Well, my definition of Vector is a mono-dimensional array. So, if you could specify what exactly is not allowed, you can consider it done.

$30 USD in 0 days
(0 Reviews)

Sir, I'm a computer science engineer and can get u the job done perfectly in a few minutes for $20.

$30 USD in 0 days
(0 Reviews)

Hello, it is a easy project. According to your requirement, I will use two function and name space std. I am sure i can do this project asap, as i an expert in c,c++. You can give me the project. Thanks.

$30 USD in 1 day
(0 Reviews)