Professional Documents
Culture Documents
Laboratory Work No. 3: Structures As Aggregate (Composite) Data Type
Laboratory Work No. 3: Structures As Aggregate (Composite) Data Type
2019-20 Fall
You are expected to develop a C program that keeps course information and calculates the grade point average. Write a template structure
definition for both course and student data structures. Assume that the student can be represented by an ID, name, surname, and
department information whereas the course can be represented by a course code, title, and credit hour.
c) Write structure definition of the semester (keeping student information, three courses taken, and a GPA value)
i. get_course_info(..) : asks the user information about a course, and fills the related fields
ii. get_student_info(..) : asks the user information about a student, and fills the related fields
iii. create_semester(..) : creates a semester for one student where the student takes three courses
iv. calculate_gpa(..) : calculates semester-based GPA of the student
v. display_info(..) : displays to the screen complete semester information of the student
You are allowed to use any input/output function of the C standard library.
1/1