Write a c program that will declare two dimensional array called of 5 row and 5 colum. The user will enter student marks for 25 student caculate and print the minimum and maximum average marks those students.

int scores(5,5);

...

nak jawapan

Sure! Here's a C program that fulfills your requirements:

```c
#include <stdio.h>

#define ROWS 5
#define COLS 5

float calculateAverage(float marks[], int numSubjects) {
float sum = 0;
for (int i = 0; i < numSubjects; i++) {
sum += marks[i];
}
return sum / (float) numSubjects;
}

int main() {
float studentMarks[ROWS][COLS];
float studentAverages[ROWS];
float minAverage, maxAverage;

// Input student marks
printf("Enter the marks for %d students:\n", ROWS * COLS);
for (int i = 0; i < ROWS; i++) {
for (int j = 0; j < COLS; j++) {
printf("Enter the marks for student %d, subject %d: ", i + 1, j + 1);
scanf("%f", &studentMarks[i][j]);
}
}

// Calculate average marks for each student
for (int i = 0; i < ROWS; i++) {
studentAverages[i] = calculateAverage(studentMarks[i], COLS);
}

// Find minimum and maximum average marks
minAverage = maxAverage = studentAverages[0];
for (int i = 1; i < ROWS; i++) {
if (studentAverages[i] < minAverage) {
minAverage = studentAverages[i];
}
if (studentAverages[i] > maxAverage) {
maxAverage = studentAverages[i];
}
}

// Print the minimum and maximum average marks
printf("Minimum average marks: %.2f\n", minAverage);
printf("Maximum average marks: %.2f\n", maxAverage);

return 0;
}
```

Explanation:

1. We start by declaring a two-dimensional array `studentMarks` of size `ROWS` (5) by `COLS` (5) to store student marks.
2. We also declare a one-dimensional array `studentAverages` of size `ROWS` to store the average marks of each student.
3. The `calculateAverage` function takes an array of marks and the number of subjects as input and returns the average marks.
4. In the `main` function, we prompt the user to input the marks for each student using nested loops.
5. Within the nested loops, we use the `scanf` function to read the marks from the user and store them in the `studentMarks` array.
6. After inputting all the marks, we calculate the average marks for each student by iterating over the `studentMarks` array and storing the results in the `studentAverages` array using the `calculateAverage` function.
7. Next, we initialize the variables `minAverage` and `maxAverage` with the value of the first student's average marks (`studentAverages[0]`).
8. We then iterate over the `studentAverages` array starting from the second student (`i = 1`) to find the minimum and maximum average marks.
9. Finally, we print the minimum and maximum average marks using `printf` statements.

To run this program:

1. Save the code in a file with a `.c` extension (e.g., `student_marks.c`).
2. Compile the program using a C compiler (e.g., `gcc -o student_marks student_marks.c`).
3. Run the program (e.g., `./student_marks`).
4. Follow the prompts to input the student marks.
5. The program will then calculate and print the minimum and maximum average marks.

Note: This program assumes the input is correctly entered by the user. Proper input validation is not included in this example for simplicity.