WAP to enter to write integer number to file and read from file.
Defination:: WAP to enter to write integer number to file and read from file.
Source Code ::
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *f;
int n;
clrscr();
f=fopen("test.txt","w");
printf("enter no");
scanf("%d",&n);
putw(n,f);
fclose(f);
f=fopen("test.txt","r");
printf("%d",n);
fclose(f);
getch();
}
Source Code ::
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *f;
int n;
clrscr();
f=fopen("test.txt","w");
printf("enter no");
scanf("%d",&n);
putw(n,f);
fclose(f);
f=fopen("test.txt","r");
printf("%d",n);
fclose(f);
getch();
}
WAP to enter to write integer number to file and read from file.
Reviewed by Unknown
on
21:36
Rating:
No comments: