Question: 1. The compound data type in C programming consists of array and structure. a) Declare a single dimension of floating point array, named ECG_record, which

1. The compound data type in C programming consists of array and structure. a) Declare a single dimension of floating point array, named ECG_record, which could store total of 1000 data. [2 marks] b) Declare a 2-dimension array, named matrix, with size as shown in below and initialized value. 1 2 3 7 (11 12 13 6 8 4 9 14 5 10 15) [4 marks] c) Write a C code segment to sum up all the elements in matrix using for loop. [5 marks) d) Define a structure data type, named patient_info where it consists of three (3) data members as listed below: Name, with character array that could store 30 alphabets age with integer datatype medical_bill with float datatype. (5 marks) e) Declare an array of structure patient_info, named ICU_patients, which could store total of 30 patient records. [2 marks] f) Assume now there is an ICU patient who is stored as the second (2nd) record in ICU_patients is charged USD 15000 for his medical bill, write the correct statement to perform this action. [2 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
