C Program Of getw() and putw()

C Program Of getw() and putw()

#include<stdio.h>

main()
{

FILE *fp;
int j;
int i;

fp=fopen("delu.txt","w");

for(i=0;i<20;i++)
{

putw(i,fp);

}

fclose(fp);


fp=fopen("delu.txt","r");

while((j=eof(fp))!=0);
{

printf("%d\n",j);

}

fclose(fp);

}

Related Posts