Write the student name and roll number and store the information.Write the subje
ID: 3630382 • Letter: W
Question
Write the student name and roll number and store the information.Write the subject code and the marks for a student identified by his roll number and store the information.Write the subject code for a student identified by his roll number and delete the subject and the marks.Write the roll number of a student and delete the full entry for the student.Compute and report the average marks obtained by the student.Compute and report the number of free locations in each array that is allocated.Quit the programExplanation / Answer
#include #include #define MINFREE 3 /*Defining the structures for student data*/ typedef struct{ int subj; int marks; }sub_mark; typedef struct{ int roll_no; char name[20]; int no_sub; sub_mark *subject; }student_data; student_data *data; /*Function to find the data of a student given its roll no.*/ int data_rol(int n) { int i,roll,flag=0; printf("Enter the roll no.:"); scanf("%d",&roll); for(i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.