How to Read the File in C Programming Language | using fopen , fgets functions

Описание к видео How to Read the File in C Programming Language | using fopen , fgets functions

#fileoperation #c #fread #fopen

hello friends ,
using these program you can read from any text file...
to find the more information about fopen and fgets function please use man command

here is the code

int main()
{
char buffer[512];

FILE *fp = fopen("text.txt","r");

while(fgets(buffer,sizeof(buffer),fp)!=NULL)
printf("%s",buffer);

fclose(fp);

return 0;
}

Комментарии

Информация по комментариям в разработке