C program for average of n numbers using file handling