Skip to main content

OPENING A FILE USING W+ MODE


LIST OF PROGRAMS


#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
FILE *fp;
clrscr();
fp=fopen("anujhello.txt","w+");
printf(" ENTER THE DETAILS");
ch=getchar();
while(ch!='\n')
{
putc(ch,fp);
ch=getchar();
}
rewind(fp);
while((ch=getc(fp))!=EOF)
printf("%c",ch);
fclose(fp);
getch();
}

LIST OF PROGRAMS

Comments

Popular posts from this blog

unix commands