Answered step by step
Verified Expert Solution
Question
1 Approved Answer
its not there. this is for power engineering but i did not find that feild. Problem Description Write and run a C program that reads
its not there. this is for power engineering but i did not find that feild.
Problem Description 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". o The program performs the following: o Creates one array named arr1 of 15 elements. o Define and implement a function named FillArr1 that receives two parameters: an array arr of integers and its size n. FillArr1 fills the array Arr1 with difference between 2 random numbers in the range of 1 to 5 for the first one, and 6 to 15 for the second one. Consider to randomize the generated random values for each execution of the program. Define and implement a function named printArr1 that receives two parameters: an array arr of integers and its size n. printArr1 Prints each number in the Arri array, then prints a bar consisting of that many asterisks (*) beside the number. o Define and implement a function named SortArray that receives two parameters: an array a of integers and its size n. and sort the array in descending order. The array's elements can be entered statically or by using scanf. o Define and implement a function named SearchArray that receives three parameters: an array a of integers, its size n and the Key. and print "Found" if the key available. Otherwise print "Not Found!" The output should be as follow: Sample Output Index Randi Rand2 Histogram ****** *** 1 2 3 4 4 3 1 1 2 10 6 15 7 11 ***** *** Problem Description 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". o The program performs the following: o Creates one array named arr1 of 15 elements. o Define and implement a function named FillArr1 that receives two parameters: an array arr of integers and its size n. FillArr1 fills the array Arr1 with difference between 2 random numbers in the range of 1 to 5 for the first one, and 6 to 15 for the second one. Consider to randomize the generated random values for each execution of the program. Define and implement a function named printArr1 that receives two parameters: an array arr of integers and its size n. printArr1 Prints each number in the Arri array, then prints a bar consisting of that many asterisks (*) beside the number. o Define and implement a function named SortArray that receives two parameters: an array a of integers and its size n. and sort the array in descending order. The array's elements can be entered statically or by using scanf. o Define and implement a function named SearchArray that receives three parameters: an array a of integers, its size n and the Key. and print "Found" if the key available. Otherwise print "Not Found!" The output should be as follow: Sample Output Index Randi Rand2 Histogram ****** *** 1 2 3 4 4 3 1 1 2 10 6 15 7 11 ***** *** Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started