Question: Assignment: 2 9 April 2 0 2 4 ( please use only c not other programming languages ) ARRAYS, STRINGS, AND FILES MANIPULATION Exercise 1

Assignment: 29 April 2024(please use only c not other programming languages)
ARRAYS, STRINGS, AND FILES MANIPULATION
Exercise 1:Power Plant Data Management
The data file power1.txt contains a power plant output in megawatts over a period of 10 weeks. Each row of data contains
7 floating-point numbers that represent 1 weeks data. In developing the following programs, use symbolic constants NROWS
and NCOLS to represent the number of rows and columns in the array used to store the data.
(a) Write a function to compute and print the average power output over this period. Also print the number of days with
greater than the average power output.
(b) Write a function to print the day of the week and the number of the week on which the minimum power output occurred.
If there are several days with minimum power output occurred. If there are several days with minimum power output,
print the information for each of these days.
(c) Write a function to compute the average of a specified column of a two dimensional array that has NROWS rows
and NCOLS columns. The parameters should be the floating-point array and the desired column. Assume that the
corresponding function prototype is
double col_average(double x[][NCOLS],int col)
(d) Write a program to print a report that lists the average power output for the first day of the week, then the second day of
the week, and so on. Print the information in the following format:
Day x Average Power Output in megawatts: xxxx.xx
(e) Write a program to print a report that lists the average power output for the week, the second week, and so on. Print the
information in the following format:
Week x Average Power Output in megawatts: xxxx.xx
(f) Write a program to compute and print the mean and variance of the power plant output data.
(g) Provide a driver program to test the functions above.

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!