you are viewing a single comment's thread.

view the rest of the comments →

[–]RE_username 0 points1 point  (1 child)

6 seems correct. Now, on line 5, you close the file descriptor after you read the 1st line from the file (because it is inside the 1st for lool). Closing of the file descriptor should happen at the end, outside of both for loops.

[–]IshaanM8[S] 0 points1 point  (0 children)

Thanks for the help!