Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions