Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help me write this program? array stuct.c contains the basis for writing a program to determine the min, max, and average of ages

Can you help me write this program?
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
array stuct.c contains the basis for writing a program to determine the min, max, and average of ages and heights using an array of structures. of the function init.array0. The prototype is given in array-struct.h. 2. Write a function that finds the min of the ages. Return the index. 3. Write a function that finds the min of the heights. Return the index 4. Write a function that finds the max of the ages. Return the index. 5. Write a function that finds the max of the heights. Return the index. 6. Write a function to find the average age of the test subjects. Return the average age. 7. Write a function to find the average height of the test subjects. Return the average height 8. Wirite a finction to print an individual structure. Returns nothing 9. Print each structure item that corresponds to the minimum age, the maximum age, the minimum height, and the maximum height. 10. Print the average age and the average height of the test subjects. 11. Run with the provided data in array.struct.c and save it as array.struct.script array_struct.c array_ struct.h 2 #define ARRAY-STRUCT-H- 3 4 5#define szE 5 6 7 struct data tc 8 9 int age; age of the subject 1 int height height of subject in tnches char subject:one capttaL Letter td for subject m/ 12 4 5 votd init array(struct data t data[l, nt tndex. char td, tnt years, tnt nches 16 17 18 #endtf array struct.c 1#include 2 #include "array-struct. h" 3 4 5 int main (void) 6 t 7 8 9 10 struct data t datalSIZE]: 12 13 1 4 15 16 17 18 19 / data initialization calls / nt_array(data, o, 'A,, 23, 74 ) ; initilarray(data, 1B2 2 P64); init array data, 2NCOI.68): initi array(data, 3,DC20 76); init array(data, 4, E22,62) return o

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

Solve the equation using the zero-factor property. 4x 2 4x + 1 = 0

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago