Ποιο από τα συμπεράσματα, που αφορούν στη λειτουργία του ακόλουθου
προγράμματος, είναι λανθασμένο;
#include <stdio.h>
#include
<conio.h>
#include
<stdlib.h>
main()
{
FILE *fptr;
char ch,string[81];
int white=1;
int count=0;
if ((fptr=fopen("file1.txt","r")) = =NULL)
{
printf("ERROR: can't open file");
exit(1);
}
while ((ch=getc(fptr))!=EOF)
{
switch(ch)
{
case ' ':
case '\t':
case '\n':
white++;
break;
default:
if (white)
{
white=0;
count++;
}
break;
}
}
fclose(fptr);
printf("The file contains %d words\n",count);
}