Question: In C language Write code for the struct header file named course.h that consists of the following: header guard struct definition for Course which consists

 In C language Write code for the struct header file named In C language

Write code for the struct header file named "course.h" that consists of the following: header guard struct definition for Course which consists of: o subject (string of 2 characters) - refers to the subject/department for the course, e.g., "CS" o courseNo (int) - refers to the course number, e.g., 1083, 1714 o maxEnrollment (int) - refers to the maximum number of students that can be enrolled in the course o curEnrollment (int) - refers to the number of students that are currently enrolled in the course function prototypes for the following functions: o fillCourses() The function will take in two parameters: array by reference and the length of the array. o The function will not return anything. The function will initialize all the data members for all the struct array objects. o subject values should be initialized to "CS" o courseNo values should be initialized to the index in the array o maxEnrollment values should be initialized to a random value between 50 and 80, inclusive o curEnrollment values should be initialized to o o calculateAverageEnrollment() The function will take in two parameters: array by reference and the length of the array. o It will calculate the average enrollment for all courses using the curEnrollment data member. o The function will return this average (double) value

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!