C++20 sections · 1024 units
Open in CourseQuiz: Error States
Knowledge check
Check Your Understanding
What must you do before reading again after hitting end-of-file?
- A.Both B and C
- B.Call file.clear() to reset error flags
- C.Seek back to the beginning with seekg(0)
- D.Close and reopen the file