#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
clrscr();
FILE *fp;
fp=fopen("Vikas.txt","w");
char a[80];
while(strlen(gets(a))>0)
{
fputs(a,fp);
fputs("\n",fp);
}
getch();
}
------------------------------------------------------------------------
#include<stdio.h>
------------------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
FILE *fp;
fp=fopen("Vikas.txt","w");
char a[80];
while(strlen(gets(a))>0)
{
fputs(a,fp);
fputs("\n",fp);
}
getch();
}
--------------------------------------------------------------------------
The running environment supports at least FOPEN_MAX files open simultaneously; FOPEN_MAX is a macro constant defined in <cstdio>.
No comments:
Post a Comment