Рет қаралды 999
Repository with code: github.com/mor...
This video is part of a new series, in which I read the book "C Programming Language, 2nd Edition" by Brian W. Kernighan and Dennis M. Ritchie, known world-wide as "Kernighan and Ritchie".
In this video, I get bamboozled by the book using their own home-brewed implementation of getline, which was added to the C standard quite a while ago. Then I decide to rewrite their program using the implementation from the standard library, which forces me to also use realloc and free, and then we also sprinkle strcpy on top.
None of this would be exciting without some segmentation faults and me searching the Web for gdb usage instructions.