Question: Please do this in C. Lab 10 Student Records Due Tuesday, April 25th at 11:59 PM objectives Learn to create and use a struct More

Please do this in C.

Please do this in C. Lab 10 Student Records Due Tuesday, April

25th at 11:59 PM objectives Learn to create and use a struct

More practice with creating custom types Practice dynamically allocating arrays Learn to

redirect a file to stdin Overview For this lab, you will input

and store a set of student records. For each student, you will

Lab 10 Student Records Due Tuesday, April 25th at 11:59 PM objectives Learn to create and use a struct More practice with creating custom types Practice dynamically allocating arrays Learn to redirect a file to stdin Overview For this lab, you will input and store a set of student records. For each student, you will keep track of their student id (sid), their name, and a list of course grades. From this information, you will calculate each student's GPA. After recording all the student information and calculating the GPA, you will print back all the records in your student database. Student Record Begin by defining a struct. In this structure, you will store the following fields student id named sid (int) last name (char array) first name (char array) array of grades (float pointer--we're going to allocate this dynamically, so we just need a float here gpa value (float) For the first and last name arrays, assume a maximum size of 25. Set a preprocessor directive #define NAME SIZE 25 and use this value to determine the size of the first and last name character arrays. We also wish to store a list of grades in the student record. However, we do not know the size of this array in advance. Instead you should store a pointer to a float. You will later set this pointer to point to the beginning of an array of floating point values (the grades) Lastly, wrap your structure definition with a type definition and name your type student t TIP. By using a typedef and naming it student, we can avoid writing out struct student each time we need to refer to the structure, and instead refer to just student t main Function 1. Prompt the user for the total number of students. Next, prompt the user for the total number of grades to record for each student

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