new to using classes in C
# include <stdio.h>

int main(void) {

int numStudents;
int i = 0 ;
int sum;

printf("How many students are in your class? \n");
scanf("%d", &numStudents);

int grade[numStudents];


while ( i < numStudents ){
      scanf("%d", &grade[i]);
      printf("\n");
      i++;
      }

average(int grade[numStudents]);
printf("%d", &sum);     
    
}


int average(int x[y]){
    int sum;
    
    for (a=0; a<=y ;a++){
    sum = sum + x[a];
    }
    
    sum = sum / y;
    return sum;
}

new to using classes in C
===

# include <stdio.h>

int main(void) {

int numStudents;
int i = 0 ;
int sum;

printf("How many students are in your class? \n");
scanf("%d", &numStudents);

int grade[numStudents];


while ( i < numStudents ){
      scanf("%d", &grade[i]);
      printf("\n");
      i++;
      }

average(int grade[numStudents]);
printf("%d", &sum);     
    
}


int average(int x[y]){
    int sum;
    
    for (a=0; a<=y ;a++){
    sum = sum + x[a];
    }
    
    sum = sum / y;
    return sum;
}
