Question: In C language CS-1714 course variable information unavailable Write code for the struct header file named student.h that consists of the following: header guard includes
In C language CS-1714
course variable information unavailable
Write code for the struct header file named "student.h" that consists of the following: header guard includes for header files needed struct definition for Student which consists of: o name (string of 10 characters) - refers to the full name of the student oid (int) - refers to the student's id ogpa (double) - refers to the student's spa o courses Reg (10 Course array) - refers to the list of courses the student is currenty registered in this semester, max 10 allowed o numCourses (int) - refers to the actual number of courses the student is enrolled in this semester function prototypes for the following functions: o addcourse() The function will take in two parameters: the Student variable passed by value, one Course information passed by reference. o The function will return the updated Student information. The function will add the course to the back of the coursesreg array and increase the numCourses for the Student by 1. o If the course added to the student, increment the curEnrollment for the Course by 1. o Adding a course should only be allowed if the numCourses are less than 10 AND if there is a space in the course, i.e., the curEnrollment is less than the maxEnrollment for the course. o printStudent () o The function will take in three parameters: the Student array, the length of the array, and the id for the student to be printed. o if the student is not found, print "Student not Found!! " o if the student is found, print the following each in new line: o id - name - gpa o Number of courses - numCourses o Print all courses in new line in the format - "subject - courseNo - maxEnrollment -curEnrollment" o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
