In an academic institution, Student has its records. Each

student has his/her profile such as id number, student name.
The institution also keeps records of student grades in each
subject. Student grades contains information subject description,
school year, semester, and grade.
Make a program that would accept entries for the grades of
the student(maximum of 5 subjects in each semester).
After entering the grade for subject, the program will display
the enter subject and the student average.
* In entry and display of grades for each subject, use pointer.
* Use data structure for the information about the student,
and for his/her subject grades
SAMPLE OUTPUTSample Output:
Student ID : 10-1000
Student Name : Juan de la Cruz
Entry of Subject :
Subject 1 Name : Programming 1
School Year : SY 2011-11
Semester : 1
Grade : 90
Subject 2 Name : Algebra 1
School Year : SY 2011-11
Semester : 1
Grade : 85
Subject 3 Name : IT Fundamentals 1
School Year : SY 2011-11
Semester : 1
Grade : 80
Student Grades:
ID : 10-1000
Student Name : Juan de la Cruz
Programming 1 SY 2011-11 1 90
Algebra 1 SY 2011-11 1 85
IT Fundamentals 1 SY 2011-11 1 80
Student Average : 85

Three

To create a program that accepts entries for the grades of a student and calculates their average, we can use a combination of data structures, pointers, and loops. Here's a step-by-step guide on how to achieve this:

1. Define a structure to hold the information about a student. This structure should have fields for student ID, student name, and an array to store the grades of the student.

```c
struct Student {
char id[10];
char name[100];
float grades[5];
};
```

2. Create a function to accept the student's information and grades. This function should take a pointer to the student structure as a parameter and use it to store the entered data. Use loops to iterate over the number of subjects (five in this case) and prompt the user for the subject name, school year, semester, and grade.

```c
void enterGrades(struct Student* student) {
printf("Student ID: ");
scanf("%s", student->id);

printf("Student Name: ");
scanf("%s", student->name);

printf("Entry of Subject:\n");
for (int i = 0; i < 5; i++) {
printf("Subject %d Name: ", i + 1);
scanf("%s", subjectName);

// Code for entering school year, semester, and grade for each subject
}
}
```

3. Create a function to calculate the student's average grade. This function should take a pointer to the student structure as a parameter and iterate over the grades array, summing up all the grades. Finally, divide the sum by the number of subjects to get the average.

```c
float calculateAverage(struct Student* student) {
float sum = 0;
for (int i = 0; i < 5; i++) {
sum += student->grades[i];
}

return sum / 5;
}
```

4. In the main function, create a student structure object, pass its address to the `enterGrades` function, and then calculate and display the average using the `calculateAverage` function.

```c
int main() {
struct Student student;

enterGrades(&student);

printf("Student Grades:\n");
printf("ID: %s\n", student.id);
printf("Student Name: %s\n", student.name);

// Display subject grades here

float average = calculateAverage(&student);
printf("Student Average: %.2f\n", average);

return 0;
}
```

With these steps, you should be able to create a program that accepts entries for the grades of a student and calculates their average.