Sunday, 21 January 2018

Program for Copy


Program for Copy
#include<stdio.h>
#include<conio.h>
main()
{
FILE *fp1,*fp2;
char ch;
clrscr();
fp1=fopen("sunil.c","r");
fp2=fopen("kumar.c","w");
if(fp1==NULL)
{
printf("FILE NOT FOUND....");
}
else
{
while(!feof(fp1))
{
ch=fgetc(fp1);
fputc(ch,fp2);
}
}
getch();
fcloseall();
}

0 comments:

Post a Comment