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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f308ea25973_56166f308e99c178.jpg)
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
Get step-by-step solutions from verified subject matter experts
