Question: Given the following structure definition. struct Subject {char code [10]; double score; char grade;}; Write a complete C program, making use of the structure definition

 Given the following structure definition. struct Subject {char code [10]; double

Given the following structure definition. struct Subject {char code [10]; double score; char grade;}; Write a complete C program, making use of the structure definition given, that accomplishes each of the following tasks. Declare a 3-element array of type subject called term1 and initialize it with the values given in Table Q2.1 below, The association of grade and mark is given in Table Q2.2. Determine and store the grade of each subject accordingly. Display the grade of each subject in one line. A sample output is given below: Grade of each subject: BAC How are the following aspects affected if the data in Table Q2.1 is to be implemented using a linear linked list, instead of an array? structure definition, memory allocation (static/dynamic and how it is done), access to the data (random/sequential and how it is done)

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!