#include<stdio.h>
#include<stdlib.h>
int main()
{
int a=0;
char fname[30],ch;
FILE *fp;
printf("\n Enter file name : ");
gets(fname);
fp=fopen(fname,"r");
if(fp==NULL)
{
printf("\n ");
exit(0);
}
ch=fgetc(fp);
while(ch!=EOF)
{
if(a==0)
{
printf("%c",ch);
a=1;
}
else
a=0;
ch=fgetc(fp);
}
fclose(fp);
return 0;
}