Ok im trying to call my bublesort function but it keeps saying im missing one argument. what does it mean?
Code:
#include <stdio.h>
#define NUMBERofSTUDENTS 3
#define EXAMSCORES 4
void bubblesort( int[][EXAMSCORES], int, int);
int main(void){
int exams;
int ex;
int studs;
const int studentGrades[NUMBERofSTUDENTS][EXAMSCORES]=
{ {77,68,86,73},
{96,87,89,78},
{70,90,86,81}};
for(exams=0;exams<EXAMSCORES;exams++){
bubblesort(studentGrades, NUMBERofSTUDENTS, exams);
}
return 0;
}
// line 29
void bubblesort( int a[][EXAMSCORES],int students, int exams){
int i;
int j;
int temp;
for (i=0;i<students;i++)
{
for(j=0;j<students-1;j++){
if(a[j][exams] > a[j][exams+1])
{
temp=a[j][exams];
a[j][exams]=a[j][exams+1];
a[j][exams+1]= temp;
}
}
}
}