Question
Write a C program to compute the average marks in a subject of all the students in a class.
Answer :
Word Count : 333
___ __________ _____ _________ ____ ________ __________ _______ _________.
________ ________ ___ ________ __________ _______ ___.
_________ _________ _____ _________ ____ ____.
_____ _________ ___ __________ __________ _________ ______.
_______ _____ _____ ___ ______ ______ ___ ___ ______.
_______ ______ _________ _________ ___ __________.
______ ________ __________ __________ _________ _____ ____ __________ _______ ____ ________.
____ _________ ________ _____ __________ ______ _________ __________ _______ _______ ___ ______.
_________ _____ _____ ___ ____ ________ ________ _____ __________ __________.
__________ __________ _____ __________ _______ ___ __________.
__________ _______ _____ ____ __________ ______ __________ ________ _____ ______ ____.
_____ __________ ________ ______ _______ ___ ___.
______ ______ _____ ___ ___ ___ _____.
__________ __________ ____ __________ ________ ______ _____ ______ ____.
___ _________ ____ _______ ____ _________.
_________ _____ ________ ____ _______.
_______ _________ __________ ________ ______.
_________ ____ ________ ________ ______ _________ ______ ______ ____ _________ __________.
_________ ________ __________ ______ ___ _____ _______ __________ ________.
__________ ______ ___ ____ ___ ________.
____ _________ _________ __________ _____.
_______ _____ ___ __________ _________ _______ __________ ______ _____ ____ __________ ____.
_______ _____ _______ _______ ___ _______ _____ _______ _________ __________.
_________ __________ _______ ________ _________ ______.
_____ ___ ____ ____ _______ ______ ___ _________ _____ ___ _________ ______.
___ _________ ______ ________ _____ _______ ________.
_____ ______ _____ _______ ____ ______ _______ _____.
____ ____ _________ ____ ____ _____ ________ ________ ____ ________.
Skip in 10
To compute the average marks of all students in a class, you can write a C program that takes the number of students and their respective marks as input, then calculates the sum of all marks, and finally computes the average by dividing the sum by the total number of students.
Here is the C program to achieve this:
```c
#include <stdio.h>
int main() {
int n; // Number of students
float sum = 0.0, average;
// Prompt the user to enter the number of students
printf("Enter the number of students:
________ ________ ___ ________ __________ _______ ___.
_________ _________ _____ _________ ____ ____.
_____ _________ ___ __________ __________ _________ ______.
_______ _____ _____ ___ ______ ______ ___ ___ ______.
_______ ______ _________ _________ ___ __________.
______ ________ __________ __________ _________ _____ ____ __________ _______ ____ ________.
____ _________ ________ _____ __________ ______ _________ __________ _______ _______ ___ ______.
_________ _____ _____ ___ ____ ________ ________ _____ __________ __________.
__________ __________ _____ __________ _______ ___ __________.
__________ _______ _____ ____ __________ ______ __________ ________ _____ ______ ____.
_____ __________ ________ ______ _______ ___ ___.
______ ______ _____ ___ ___ ___ _____.
__________ __________ ____ __________ ________ ______ _____ ______ ____.
___ _________ ____ _______ ____ _________.
_________ _____ ________ ____ _______.
_______ _________ __________ ________ ______.
_________ ____ ________ ________ ______ _________ ______ ______ ____ _________ __________.
_________ ________ __________ ______ ___ _____ _______ __________ ________.
__________ ______ ___ ____ ___ ________.
____ _________ _________ __________ _____.
_______ _____ ___ __________ _________ _______ __________ ______ _____ ____ __________ ____.
_______ _____ _______ _______ ___ _______ _____ _______ _________ __________.
_________ __________ _______ ________ _________ ______.
_____ ___ ____ ____ _______ ______ ___ _________ _____ ___ _________ ______.
___ _________ ______ ________ _____ _______ ________.
_____ ______ _____ _______ ____ ______ _______ _____.
____ ____ _________ ____ ____ _____ ________ ________ ____ ________.
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.