93. Program to accept data in lower case and store the given data into file into upper case and print the data.
Code:
#include<conio.h>
#include<stdio.h>
main( )
{
FILE *fp;
Char c;
fp=fopen(“data2.dat”,”w”);
clrscr( );
printf(“enter text”);
while((c=getchar( ))!=eof( ))
{
putc(toupper(c),fp)
}f
close(fp);
fp=fopen(“data2.dat”,”r”);
while(1)
{c
=getc(fp);
if(c==eof( ))
break;
putchar(c);
}
getch( );
fclose(fp);
}
All materials on the site are licensed Creative Commons Attribution-Sharealike 3.0 Unported CC BY-SA 3.0 & GNU Free Documentation License (GFDL)
If you are the copyright holder of any material contained on our site and intend to remove it, please contact our site administrator for approval.
© 2016-2025 All site design rights belong to S.Y.A.