Heya people i really would appreciate some help here..
The Program Works Just Fine At compiling but after like 1 second after ctrl + f10 to test it i get an error . I looked on google and it is something like Killed by signal 8(SIGFPE).
#include<cstdio>
#include<cctype>
#include<string>
using namespace std;
unsigned int i,l,c;
char txt[500];
FILE *infile;
FILE *outfile;
int main(){
infile = fopen("text.in", "r");
outfile = fopen("text.out", "w");
while(!EOF){
txt[1] = fgetc (infile);
if (isalpha(txt[1])){
c++;
l+=strlen(txt);
}
}
l=l/c;
fprintf (infile, "%d", l);
fclose(infile);fclose(outfile);
}