Well if the lines are on 4 separate lines, then you need 4 fgets() calls, followed by 4 lines to extract data and store in the structure.