RUPAK SEARCH ENGINE

Custom Search

Write a program to store one line of text in a data file.

//Write a program to store one line of text in a data file.
#include
#include
#include
void main()
{
FILE *ptr;
char c;
clrscr();
ptr=fopen("myfile.dat","w");
do
putc(toupper(c=getchar()),ptr);
while(c!='\n');
fclose(ptr);
}

No comments:

Post a Comment