Question: struct quiz{ int quizId; int totalMarks; float marksObtained; }; struct course{ int courseId; char * courseName; quiz *totalQuizes; char grade; } ; struct student {

struct quiz{

int quizId;

int totalMarks;

float marksObtained;

};

struct course{

int courseId;

char * courseName;

quiz *totalQuizes;

char grade;

} ;

struct student

{

char*firstName;

char*lastName;

char*rollNumber;

course * coursesRegistered;

int semester;

float gpa;

};

Declare a structure of student. Allocate memory and input firstName, lastName and rollNumber for the student.

Allocate memory for courses registered by that student and input each course 's data for the student. Ask the student that how many courses he has registered in that semester before allocating memory.

For each course allocate memory for three quizzes and add quiz id, total marks and marks obtained for each quiz.

On the basis of marks of quizzes that are input by user, calculate and assign the grade in that course.

On the basis of grade in each course calculate the total gpa of the student in that semester.

Input data for 10 students and then

oFind out all the students in a given CGPA range i-e: (lower range, upper range).

oFind out the students with highest and lowest GPA.

oSearch and display a Students' complete record by his Registration Number.

oDisplay Average of all courses.

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 Programming Questions!