Like I said in your previous thread.
Fix your warnings.
Code:
$ gcc -Wall bar.c
bar.c: In function ‘main’:
bar.c:17:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[8]’ [-Wformat=]
scanf("%s", matrice);
^
bar.c:23:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[8]’ [-Wformat=]
printf("\nName %d: %s ", i, matrice);
^
bar.c:28:13: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int (*)[(sizetype)(m)]’ [-Wformat=]
scanf("%d", &mat1[k]);
^
bar.c:33:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[8]’ [-Wformat=]
printf("\nName %d: %s ", i, matrice);
^
bar.c:37:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
printf(" %d", mat1[k]);
^
bar.c:43:13: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
somma = somma + matrice[k];
^
bar.c:47:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
printf("\nAverage: = %s", media);
^
bar.c:50:3: warning: statement with no effect [-Wunused-value]
getc;
^
bar.c:11:7: warning: unused variable ‘vet1’ [-Wunused-variable]
int vet1[n];
^
> for (i = 1; i <= n; i++)
Arrays start at 0, not 1.
For an n element array, it's for (i = 0; i < n; i++)