it gets compiled but it crushes: "programm has stopped working"
Please help me!!!
this is the programm:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
FILE *fp;
int i=0, n;
char allwords[100][40];
fp=fopen("fraoules.txt","r");
if ( (fp=fopen("fraoules.txt","r") )==NULL ){
printf("To arxeio den mporese na anoixtei\n");
}
while(strcmp( allwords[i],"telos")!=0){
fscanf(fp, "%s", allwords[i+1]);
i++;}
fclose(fp);
for(n=0; n<i; n++)
printf("%s", allwords[n]);
system("PAUSE");
return 0;
}