Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code this using C language and comment on each sections for understanding the code. 1. Introduction In this program, you will practice working with

Please code this using C language and comment on each sections for understanding the code.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
1. Introduction In this program, you will practice working with arrays. Your program will read lines of text from the keyboard and use an array to track the number of times each letter occurs in the input text. You will use the contents of this array to generate a histogram (bar graph) indicating the relative frequencies of each letter entered This assignment was adapted from an earlier assignment by Prof. George Cheney 2. Deliverables This assignment uses multiple files, all of which you will have to write-there are no starter files for this assignment: prog6 histogram.c: Source file containing your main function prog6 functions.h: Header file containing function prototypes prog6 functions.c: Source file containing other user-defined functions Submit all three files by uploading these files to your Dropbox folder. Ensure your file names match the names specified above. Failure to meet this specification will reduce your grade, as described in the program grading guidelines 3. Specifications Note: As discussed in class, there are a couple of inefficient brute-force methods to determine which letter is entered. (These prohibited methods are described in Section 4, Hints and Tips.) Using either method will incur a 10 point deduction Program variables: At a minimum, you will need variables in main to track The number of times each letter in the alphabet has occurred in the input: o These values should be stored in an array, in which the first entry represents the number of 'A' or 'a' characters entered, and the last entry represents For example, if your first input is: Hello World!, the array should hold . The non-zero values indicate the number of 'D, 'E 'H', 'L'. '0' Note that the character inputs are case-insensitive-uppercase and the number of '2' or 'z' characters entered 0,0,0,1,1,0,0,1,0,0,0,3,0,0,2,0,0,1,0,0,0,0,1,0,0,0) R', and 'w' characters entered, respectively lowercase letters are treated the same The maximum number of times any letter occurred-3, in the example above

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

Step: 3

blur-text-image

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

Students also viewed these Databases questions