Please write a simple C program for Q2 which is after the da

Please write a simple C program for Q2 which is after the data set, Thank you!

Solution

#include<stdio.h>

struct score{
   float HW;
   float Exam1;
   float Exam2;
   float Exam3;
};
struct student{
   int id;
   int YearofSchool;
   struct score course_scores;
};

void accepect(struct student record[]){
   int i;
   for(i=0;i<10;i++){
       printf(\"Enter student details\ \");
       scanf(\"%d\",&record[0].id);
   }
}
void display( struct student record[]) {
   int i;
   for(i=0;i<10;i++){
printf( \"ID: %d\ \",record[i].id);
   }

//printf( \"overall score : %d\ \", stu->course_scores);
}
int main(){
   struct student s[10];
   accepect(s);
   display(s);
   struct score score1;
   struct student student1;
    //student[0].score1.HW=78;
//score1.Exam1=67;
//score1.Exam2=90;
//score1.Exam3=80;

   getchar();
   return 0;
}

Please write a simple C program for Q2 which is after the data set, Thank you!Solution#include<stdio.h> struct score{ float HW; float Exam1; float Exam2;

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site