Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

Evaluate where f is differentiable and (2) = (9) = 4. S 2 f'(x) dx,

Answered: 1 week ago