Whats wrong with the following:
Given test.c contains:Code:#include <stdio.h>
int main()
{
int c, total; /* declare a char array */
FILE *file; /* declare a FILE pointer */
file = fopen("test.c", "r");
while((c = getc(file)) != EOF)
{
total += c;
}
printf("Total is %d\n", total);
}
The answer i get is not correct.Code:1 2 45