C: Let's make file handing program in C #shorts #programming #cprogramming #filehandling

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Guys, Thank for supporting ❤️

#include<stdio.h>
#include<conio.h>
#include<process.h>
void main()
{


FILE* fp;
char c = ' ';
fp = fopen("text.txt", "w");
if(fp==NULL)
{
printf("file does not exit");
exit(1);
}
printf("write data & to sop press'.'");
while (c!='.')
{
c=getche();
fputc(c, fp);
}
fclose(fp);
printf("\n context read, ");
fp=fopen("text.txt", "r");
while (!feof(fp))
{
printf("%c", getc(fp));
}
getch();
}

EoTechBoy
welcome to shbcf.ru