Read files using C programming in 6 minutes! 📖

preview_player
Показать описание
#coding #programming #cprogramming

// READ A FILE

char buffer[1024] = {0};

if(pFile == NULL){
printf("Could not open file\n");
return 1;
}

while(fgets(buffer, sizeof(buffer), pFile) != NULL){
printf("%s", buffer);
}

fclose(pFile);

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

#include <stdio.h>

int main() {

// READ A FILE

FILE *pFile = fopen("input.txt", "r");
char buffer[1024] = {0};

if(pFile == NULL){
printf("Could not open file\n");
return 1;
}

while(fgets(buffer, sizeof(buffer), pFile) != NULL){
printf("%s", buffer);
}

fclose(pFile);

return 0;
}

BroCodez
Автор

I’ve recently gotten into programming and have seen many of your longer videos about different programming languages. I just have to say that what you’re doing is incredible, I have never before been able to learn anything as quickly as when watching your videos. Massive thank you Bro, you’re one of the best teachers ever.

guahlg
Автор

Nice timing, exams next week
love you :)

matta-cq
Автор

please can you talk about low level concepts like process, sockets, multithreading

ALEX
Автор

YES THIS VIDEO IS TRANSLATE IN FENCH !

alextoutcourt
Автор

bro if you have videos on data structures in C can you please drop them my exam is in 2 days please bro

manav.x
Автор

Hey Bro, could you make a Godot tutorial please? It would be really cool, I love your content

jaoajooj
Автор

Bro can you release spring boot course pls all free spring boot courses are old now and latest are paid I can't afford 😢😢😢

AKASHKUMAR-jhwq
Автор

Bro can you in function in python then please tag me if you done

MarkloydNesha
welcome to shbcf.ru