FILE – COPY

#include<stdio.h>
#include<conio.h>

main()
{
FILE *f,*f1;
int a,i;
f=fopen(“filec”,”w”);
clrscr();

printf(“Enter The Value: “);
scanf(“%d”,&a);
fprintf(f,”%d”,a);

fclose(f);

f=fopen(“filec”,”r”);
f1=fopen(“filed”,”w”);

fscanf(f,”%d”,&a);
fprintf(f1,”%d”,a);

fclose(f);

fclose(f1);
f1=fopen(“filec”,”r”);

fscanf(f1,”%d”,&a);
printf(“%d”,a);

fclose(f1);

getch();
}

Share

About the Author

Akash Padhiyar

Visit Website

There are no comments yet, add one below.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

Time limit is exhausted. Please reload CAPTCHA.