Question
Write a C function float preassignPatient(struct patient p[], int length) that looks at all length elements in the array p. The function should preassign the
Write a C function float preassignPatient(struct patient p[], int length) that looks at all length elements in the array p. The function should preassign the patient's age as an example by assigning each patient its position in the array as age. You can ignore the rest of the elements. The structure struct patient is defined as follows and can be used by the function: struct patient { int pNumber; char pName[80]; int age; int gender; }; The array for multiple patients is defined as follows before calling the function in main() (MAXL is pre-assigned 1000): struct patient pdb[MAXL]; The mean of the ages of all patients should be calculated and returned by the function.
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