Read All File Lines Into A Dynamically Allocated Array Of Strings | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Very happy to have found these, not enough C content around these days. Good job.

Majkieboy
Автор

Fantastic! Great details! Thank you for updating the C series.👍

edenng
Автор

Very helpful and useful, thank you Kevin. The good things about microcontrollers is that they can have their built-in memory expanded by connecting them to external memory, and that can be very large. A multiple blocks of memory chips can store large files of data and text for processing them at later time.

fifaham
Автор

I am currently an active student in Software Engineering, and every time you post a video it always related with the content that I am currently dealing with 😂. Thank you for this great video!

MrBolcetik
Автор

Your content is second to non. Thanks you so much.

arthur_p_dent
Автор

Great content, I think everything is mentioned here. Thank you KEVIN

naboulsikhalid
Автор

thank you very much like allways.. i wish everyone will get to know your awsome channel and have tons of subscribed
your the best teacher ever.. :)

idanmariani
Автор

It is obvious but worth pointing out sizeof(char) is always 1, unlike sizeof(char *) which is the size of the pointer. So in the realloc, there is no point in timesing by sizeof(char), even though it would be more symmetrically pleasing!

richarddaygm
Автор

I have two quick questions, what is the purpose of using the value of 1024 as suppose to another value, and my second question is does free() erase what’s in the string?

sgarcia
Автор

A little suggestion. You made a video about threading in C using the POSIX pthread library. I suggest videos about C11 threads and maybe more videos about POSIX threads (pthread).

dogdog
Автор

I just wanna ask what is the difference between having brackets after the for loop and nesting the next for loop compared to the ones without the brackets?

yamithere_
Автор

Great video! For a 2D string array, would it then be "char ***" ?

ziwaang
Автор

Wonderful explanation sir and congratulations for 22k sub...👏👏👏
I have doubt here ..
typedef int (*function)(int a, int b); this is one way I know typedef the function pointer but I'm getting confused how this is acting as function pointer Below syntax can you pls explain this .
"typedef int function(int a, int b);"
I have also found this code sample using the above syntax

#include <stdio.h>

int add(int a, int b) {
return a + b;
}

int sub(int a, int b) {
return a - b;
}

typedef int function(int a, int b);

int call_function(function *p, int a, int b) {
return p(a, b);
}

int main(void) {
int sum;

sum = call_function(&add, 10, 5);
printf("add: %d\n", sum);

sum = call_function(&sub, 10, 5);
printf("sub: %d\n", sum);

return 0;
}

ramakrishna
Автор

why **line instead of *line . why line is a pointer to pointer to char instead of pointer to char

studentofedison
Автор

I was looking for some copper, but found the real gold

MoauHbIu_BaoH
Автор

The getline() Function can read a whole line

jerryli
Автор

I tought it was forbiden to exit a loop with a break

yoruichi