Question: Write and run a C program that reads numbers from an array and graphs these numbers in the form of a bar chart or Histogram.

Write and run a C program that reads numbers from an array and graphs these numbers in the form of a bar chart or Histogram. The program performs the following:

o Creates one array named Value of 10 elements.

o Define and implement a function named FillArray that receives two parameters: an array a of integers and its size n. FillArray Fills the array Value with random numbers in the range 1 to 20. Take into account to randomize the generated random values for each execution of the program.

o Define and implement a function named printArray that receives two parameters: an array a of integers and its size n. printArray Prints each number in the value array, then prints a bar consisting of that many asterisks (*) beside the number.

Write and run a C program that reads numbers from an array

********** *** The output should be as follow: Sample Output Element Value Histogram 0 10 1 3 2 15 3 7 4 11 5 9 6 13 7 5 8 17 9 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!