You should compile your code at a high warning level, then pay attention to the warnings. For example:
Code:
test.c: In function ‘main’:
test.c:16:9: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘float *’ [-Wformat=]
printf("In %.2f tests your average is %.2f\n", &numberOftests, &average);
^
Basically, the compiler is saying that on this line:
Code:
printf("In %.2f tests your average is %.2f\n", &numberOftests, &average);
Instead of passing numberOftests and average as arguments, you passed &numberOftests and &average.