[Solved] How to debug why my C code causes a segmentation fault? [closed]
1) You check feof() first, then do a fscanf(), and then don’t check its return value (or re-check feof() at the very least. (You might have been right at the end of the file prior to the fscanf() call, or the configuration file might be malformed, but you wouldn’t detect this with your code.) 2) … Read more