Question

Write a C program to calculate the average, highest, and lowest marks obtained by students in a class using an array. Accept n marks from the user and display the results.

12 Sep 2025
Answer :
Word Count : 931
In problem solving and programming, using arrays to handle multiple data points efficiently is a fundamental concept. Arrays allow programmers to store a collection of similar types of data under a single variable name, making it easier to perform operations like searching, sorting, or aggregating data. When dealing with student marks, arrays are particularly useful because they enable the storage of all marks and allow us to process them collectively to find metrics such as the average, highest, and lowest marks. In C programming, the process begins with understanding how to declare an array, accept input, and iterate through it using loops. To solve the problem of calculating the average, highest, and lowest marks, the first step is to accept the number of students or the number of marks, denoted by `n`. This value determines the size of the array. The program then declares an array of size `n` to store the marks of all students. The next step involves inputting marks from the user. This can be achieved using a `for` loop, which iterates from the first to the nth element of the array, and at each iteration, the program prompts the user to enter a mark. This input is then stored in the corresponding index of the array. Once the marks are stored, the next step is to compute the average, highest, and lowest marks. The average is calculated by summing all the marks and then dividing the sum by the total number of students. This requires initializing a variable to store the sum, then using a loop to iterate through each element of the array, adding each mark to the sum variable. After the loop, dividing the sum by `n` gives the average. For finding the highest and lowest marks, the program uses the concept of comparison. Initially, the program assumes that the first element of the array is both the highest and lowest mark. Then, it iterates through the rest of the
_______ _______ _______ ___ __________ _______ ____ ______ ______ __________ __________.
_________ _________ _______ ________ ______ ________ _________ _________ ___ ________.
______ ____ ____ __________ _________ __________ ___ _________ ___ __________.
___ ___ ____ ________ _______.
_______ ___ _______ _________ ________ _________ ___ _____ __________ ___.
____ ________ ___ ________ _________.
__________ _______ _____ _____ ________ ___ ________ _________ ________ _______ ______ ________.
___ _____ ______ __________ _______ __________ ______ ________.
________ ________ ______ ___ _________ __________ ______ _____ ____.
_______ _________ _________ _____ ________.
__________ ___ ____ _________ __________ __________ ____ ________.
______ __________ __________ _______ ______.
______ ___ _____ ________ _________ _______ _____ ___ ________ ____.
________ __________ ___ ____ ____ ________ ______ _______.
_______ ________ _______ ____ _____.
_____ ___ _______ ___ _____ ________ _____ _______ __________.
_____ __________ ______ _____ _______ ______ ________ ______ ___ ___.
________ ___ _________ ____ ____ _____.
_____ ___ ________ ___ __________ _______ ____ __________ ________ _______.
___ ___ __________ _____ _______ ________ _____ ____ ________ ______ ___.
_______ __________ ___ ___ _______ ______ __________ __________ __________ _____ ___ _______.
______ ______ ____ __________ _________ _______ _________ _____ _________.
_______ _________ _______ _____ __________ __________ ________ ______ ____.
_____ _______ _________ ____ ______ _______ _____ _______ _____ __________ __________.
________ ________ ________ _______ _____ ______ __________ ___ _______.
____ ______ _________ _______ __________ _______ _________ _________ ________ _________.
____ _____ ______ _____ ______ ____ ___ _____ __________ _________ ____.
____ __________ _____ ________ ______ _______ ______ ____ ________ ___ _________.
_____ ____ ________ ___ _______ _________.
____ _____ _______ ______ ___.
_______ __________ _____ ________ ____ ______ ___ ________ _______ _______ _____ __________.
______ _____ ________ ___ __________ ___ _____ ______ ____ _____ __________.
_________ __________ _____ ____ ________ ____ ____ _____.
____ _________ _________ ______ _________ _______ _________ ________ ____ __________ ____ ___.
________ _______ ____ ____ ________ _______ _______ ___ _______ ___ _______ _______.
_______ _________ ______ _______ ___ _________ ______ ________ _______ _____.
________ _________ ____ ______ ____ _______ __________ _____ _______ _________ ___ _____.
________ _______ ________ ___ _______.
____ ______ ____ ____ ___ _____ _________ ________ __________ ____ _________.
__________ _________ __________ __________ _______ ________ ________ ______ _____.
__________ _________ __________ _______ _______ _______ ________ _______ ________ ___.
____ ________ _________ _______ _______.
__________ _________ _________ _____ ______ ___.
__________ ___ _____ _________ ____ __________ __________.
______ ________ _______ _______ ____ ____ ___.
_____ ________ _______ _______ _______ ________ _______ __________ ___ ________ ___ ______.
_____ _________ ________ ________ ____ __________ ______ _______ ________ ________ _________.
_______ __________ ______ ______ ____ _______.
______ ______ _____ _______ _____ ____ _________ _______ _____.
_____ __________ ___ _________ __________ ______ ____ ____.
______ _________ ___ _________ _________.
___ ______ _______ __________ ____ ________ _________.
__________ _____ _____ _________ ___ _________ __________ _____ __________ _____.
_____ __________ __________ __________ _____ ___ ______ __________ ______.
______ ______ ______ _____ ______ _________.
____ ___ ___ _________ _________ ___ _____ _________ ________ _____.
__________ ___ ________ ___ _______.
______ _____ _____ ___ ___ ___ _______ ___ _______ __________.
________ _______ ___ ___ ________.
__________ ____ _______ _____ ______ ___.
____ _____ _____ _____ ______ _____ ______ _____ ________ _____ _______ ______.
________ _________ ________ ______ ________ ______ __________ _____ ______ _______ ________ ___.
_______ ___ _____ __________ ________ _________ _________ ________ ___ ________ ______.
____ _____ ________ ________ ______.
___ _______ ___ ______ ______ _________ ___ __________ _________ ____ ______ ____.
__________ ______ __________ ________ __________ ___ _______ ________ ______.
_______ __________ _________ _______ ______ ________ _____ __________ ___.
____ _____ ________ ___ _____ ________ __________ _______ ____ _________ ______.
_______ _________ ____ _________ _________ ________ ___ _____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCS 11 2025 2026 - Write a C program to calculate the average, highest, and lowest marks | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→