Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a list of Students with the following information. struct quiz{ int quizId; int totalMarks; float marksObtained; }; struct course{ int courseId; char * courseName; quiz

a list of Students with the following information.

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;

};

Do the following tasks:

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.

Note:

Use Proper Checks while taking input of CGPA (not greater than 4.0 or less than 0.0)

Use Proper Checks while taking input of Semester # (not greater than 8 or less than 1)

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

Step: 3

blur-text-image

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions