Question
Using Structures in C, write an interactive program to display the mark-sheet and grade card for 10 students for a MOOC course. Note: Assumptions can be made wherever necessary and mention them.
Answer :
Word Count : 928
_________ __________ _______ _______ ___ ____ ___ ________ _________.
_________ ____ __________ ____ __________ _____ __________ __________ _________ ________ _________ _________.
_________ _____ _____ ____ _________ __________ _______.
_____ _______ ___ ___ _________ ___.
_____ __________ _____ _______ ____.
___ ____ ______ ______ ___ ______ ____.
_______ ________ ___ ____ ______ _______.
________ ______ _______ ______ ___ _______ __________ ___ _______ _________ _____ ____.
_________ __________ ________ ____ ______.
________ _____ ________ __________ _________ __________ ______ ____ ________.
__________ ____ ___ _______ ______ ________ ___.
___ _______ ___ _________ ___ _________ __________.
______ ___ ___ _________ _________ _________ _______ _______ ______ ______ _____ _________.
______ ________ _________ __________ ___ ___.
______ ________ _________ _______ ________ _______ _________ ______ _________ _________.
______ ______ ______ _______ ______ ____ ____ _____.
____ _____ __________ _______ _____ __________ __________ _____.
__________ _____ ____ ___ ______ ____ ________ _______.
__________ ________ __________ ______ ____ _____ ____ ___ ___ _____ _________ __________.
__________ _____ ______ _____ __________.
_____ _____ ___ ______ ______ _____.
____ ___ ________ ____ ______ ________ ____ ___ ___.
_______ __________ _______ ___ ____ ___ _________ _____ _____ _______.
_____ __________ __________ _______ ________ __________ ______ _______ ______.
_______ _______ ___ ______ _____ ____.
__________ ______ _________ __________ _____ ______ ____ __________ __________ _________ _____ __________.
______ _______ _______ ________ _________ ______ _______ _______.
_______ _______ ______ _________ __________ __________ ______ ________ ___ ___.
_____ _______ ______ _________ ____ _____ ________ __________ ______ ________ ________ ______.
____ _______ _________ ____ _________.
_____ ___ _______ ____ _________ ________ ________.
___ ______ ______ ________ _________ __________ _____ ______ _____ ______ __________ ____.
__________ ___ ______ ______ ________ _________ _________ _________ ________ ___ _______ _______.
______ ____ ________ _________ _________ ______ ____ ____ ________ ______ ____ ____.
___ _____ __________ ___ _________ ___ ________ ___ __________ ___.
__________ ________ ______ _____ __________ _____ ___ _______ ____.
_________ ________ ________ __________ _______.
____ _____ ___ _______ __________ _____.
____ _________ _______ ____ ___ _____ _________ ____.
________ ___ ____ ________ _____ _____ ___ ________ __________ ___ ____ ______.
__________ _________ ____ _______ ___.
__________ _________ _______ __________ _____ ________.
_________ _______ _________ _____ ____ ________.
____ __________ ___ ____ _____ ________ ___ ____.
__________ _____ _______ ______ ____ ______ _________ __________ ___ __________ _____ ________.
___ _______ _____ __________ ______ _______ ____.
_______ ___ _________ ___ ______ __________ _________ ________ ____ ___ _______ ________.
_________ _________ ______ __________ _________ ____ __________ _____ ____ _________ _________.
_______ __________ _______ _______ _________ _________ _____ _________ __________ ______ ______.
_____ _________ ______ _________ _______ ___ ______ ___.
_____ _________ ____ _______ ____ ________ __________ ____ _____.
___ ____ _______ ________ ________ ___.
_____ _________ ___ _____ _________ ____ __________.
_________ ____ _______ _______ ________ ________ _____.
________ _________ _______ ________ ___ _________ _______ ______ _________ ___.
______ __________ ___ ____ ___ _____ _________ ____ _________ ____.
___ ________ _____ _____ ___ ____.
_________ __________ ____ ______ ________.
_____ ____ ______ _______ _____ ___ _____ ______ _________ ____ ________ ____.
______ ___ _________ ________ ___ ____ __________ _________ ________.
__________ ______ ____ ____ ___ ___ ___ _____ ______ ______ ____ ______.
__________ ___ ____ _____ _______.
_____ __________ ___ ___ _______ ___ _______ ___ _____ __________ __________.
_____ ________ ____ ___ ____ ___ ______ __________ ________ ____ _____.
____ _______ ______ _____ ________ ______ ________ __________ ______ _________ _______ ___.
_____ ________ ____ ___ _________ ______ __________ ___ _______.
___ _______ _____ _____ ___ _____ ______ __________ ____ _________.
___ _________ ______ _____ _________ _________ _________ ___ _______.
________ _______ ____ ________ _________ ______ _________.
________ _________ _____ ___ _____ _____ __________ _____ _______ _____.
__________ __________ __________ ______ _____.
_______ ___ _____.
Skip in 10
To solve the problem of generating a marksheet and grade card for 10 students of a MOOC course using structures in C, we will proceed step-by-step.
Assumptions:
- The course has 3 subjects.
- Marks for each subject are entered as integers.
- The total marks for each student will be calculated as the sum of marks across all subjects.
- The grade is based on the total marks, with the following grading system:
- 90 and above: Grade A
- 75 to 89: Grade B
- 60 to 74: Grade C
- 50 to 59: Grade D
- Below 50: Grade F
- The student’s name, roll number, and marks for each subject will be input interactively.
Approach:
- We will define a structure to store the details of each student.
- For each student, we will store their name, roll number, and marks in 3 subjects.
- We will calculate the total marks and assign the grade.
- We will display the result for each student in a formatted manner.
Structure Definition:
A structure Student will be used to store the following information:
name: A string to store the student’s name.roll_no: An integer to store the student's roll number.marks[3]: An array to store marks for three subjects.total_marks: An integer to store the sum of the marks in all three subjects.grade: A character to store the student’s grade.
Program Implementation:
#include <stdio.h> // Define a structure to store student data struct Student { char name[50]; int roll_no; int marks[3]; int total_marks; char grade; }; // Function to calculate grade based on total marks char calculate_grade(int total_marks) { if (total_marks >= 90) { return 'A'; } else if (total_marks >= 75) { return 'B'; } else if (total_marks >= 60) { return 'C'; } else if (total_marks >= 50) { return 'D'; } else { return 'F'; } } // Function to input data for each _________ ____ __________ ____ __________ _____ __________ __________ _________ ________ _________ _________.
_________ _____ _____ ____ _________ __________ _______.
_____ _______ ___ ___ _________ ___.
_____ __________ _____ _______ ____.
___ ____ ______ ______ ___ ______ ____.
_______ ________ ___ ____ ______ _______.
________ ______ _______ ______ ___ _______ __________ ___ _______ _________ _____ ____.
_________ __________ ________ ____ ______.
________ _____ ________ __________ _________ __________ ______ ____ ________.
__________ ____ ___ _______ ______ ________ ___.
___ _______ ___ _________ ___ _________ __________.
______ ___ ___ _________ _________ _________ _______ _______ ______ ______ _____ _________.
______ ________ _________ __________ ___ ___.
______ ________ _________ _______ ________ _______ _________ ______ _________ _________.
______ ______ ______ _______ ______ ____ ____ _____.
____ _____ __________ _______ _____ __________ __________ _____.
__________ _____ ____ ___ ______ ____ ________ _______.
__________ ________ __________ ______ ____ _____ ____ ___ ___ _____ _________ __________.
__________ _____ ______ _____ __________.
_____ _____ ___ ______ ______ _____.
____ ___ ________ ____ ______ ________ ____ ___ ___.
_______ __________ _______ ___ ____ ___ _________ _____ _____ _______.
_____ __________ __________ _______ ________ __________ ______ _______ ______.
_______ _______ ___ ______ _____ ____.
__________ ______ _________ __________ _____ ______ ____ __________ __________ _________ _____ __________.
______ _______ _______ ________ _________ ______ _______ _______.
_______ _______ ______ _________ __________ __________ ______ ________ ___ ___.
_____ _______ ______ _________ ____ _____ ________ __________ ______ ________ ________ ______.
____ _______ _________ ____ _________.
_____ ___ _______ ____ _________ ________ ________.
___ ______ ______ ________ _________ __________ _____ ______ _____ ______ __________ ____.
__________ ___ ______ ______ ________ _________ _________ _________ ________ ___ _______ _______.
______ ____ ________ _________ _________ ______ ____ ____ ________ ______ ____ ____.
___ _____ __________ ___ _________ ___ ________ ___ __________ ___.
__________ ________ ______ _____ __________ _____ ___ _______ ____.
_________ ________ ________ __________ _______.
____ _____ ___ _______ __________ _____.
____ _________ _______ ____ ___ _____ _________ ____.
________ ___ ____ ________ _____ _____ ___ ________ __________ ___ ____ ______.
__________ _________ ____ _______ ___.
__________ _________ _______ __________ _____ ________.
_________ _______ _________ _____ ____ ________.
____ __________ ___ ____ _____ ________ ___ ____.
__________ _____ _______ ______ ____ ______ _________ __________ ___ __________ _____ ________.
___ _______ _____ __________ ______ _______ ____.
_______ ___ _________ ___ ______ __________ _________ ________ ____ ___ _______ ________.
_________ _________ ______ __________ _________ ____ __________ _____ ____ _________ _________.
_______ __________ _______ _______ _________ _________ _____ _________ __________ ______ ______.
_____ _________ ______ _________ _______ ___ ______ ___.
_____ _________ ____ _______ ____ ________ __________ ____ _____.
___ ____ _______ ________ ________ ___.
_____ _________ ___ _____ _________ ____ __________.
_________ ____ _______ _______ ________ ________ _____.
________ _________ _______ ________ ___ _________ _______ ______ _________ ___.
______ __________ ___ ____ ___ _____ _________ ____ _________ ____.
___ ________ _____ _____ ___ ____.
_________ __________ ____ ______ ________.
_____ ____ ______ _______ _____ ___ _____ ______ _________ ____ ________ ____.
______ ___ _________ ________ ___ ____ __________ _________ ________.
__________ ______ ____ ____ ___ ___ ___ _____ ______ ______ ____ ______.
__________ ___ ____ _____ _______.
_____ __________ ___ ___ _______ ___ _______ ___ _____ __________ __________.
_____ ________ ____ ___ ____ ___ ______ __________ ________ ____ _____.
____ _______ ______ _____ ________ ______ ________ __________ ______ _________ _______ ___.
_____ ________ ____ ___ _________ ______ __________ ___ _______.
___ _______ _____ _____ ___ _____ ______ __________ ____ _________.
___ _________ ______ _____ _________ _________ _________ ___ _______.
________ _______ ____ ________ _________ ______ _________.
________ _________ _____ ___ _____ _____ __________ _____ _______ _____.
__________ __________ __________ ______ _____.
_______ ___ _____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.