Рет қаралды 1,227
Discover how to read a file line my line in C.
To remove the '
' character at the end of the line, there should be a condition to make sure that it won't crash like:
if (read_size != 0 && line[read_size - 1] == '
')
line[read_size - 1] = '\0';
Social links:
Website: cacharle.xyz
Github: github.com/cac...
Linkedin: / charles-cabergs-328aa8214