Developing a basic student grade management system using the C programming language.

Use the stdio.h library

The maximum number of students is set to be 100.

This is the structure of a student, which includes an ID, name, and score.

In the main function, declare an array of student structures with a maximum size of MAX_STUDENTS and initialize the number of students to zero.

printf("Enter the number of students: ");
scanf("%d", &num_students);

if (num_students > MAX_STUDENTS) {
    printf("Exceeds maximum number of students.\n");
    return 1;
}

for (int i = 0; i < num_students; i++) {
    printf("Enter student ID: ");
    scanf("%d", &students[i].id);

    printf("Enter student name: ");
    scanf("%s", students[i].name);

    printf("Enter student score: ");
    scanf("%f", &students[i].score);
}

printf("\nStudent Information:\n");
printf("ID\tName\tScore\n");

for (int i = 0; i < num_students; i++) {
    printf("%d\t%s\t%.2f\n", students[i].id, students[i].name, students[i].score);
}

return 0;

Could you please provide me with a copy of the report?

Leave a Reply 0

Your email address will not be published. Required fields are marked *