•
Adding to the end of the file.
•
Binary files are handled differently, so things like BEL, LF, CR, aren't treates like characters or end-of-line or end-of-file markers.
•
A file is a stream of bytes, and EOF is the end-of-file marker. When that character is encountered, that's where the language considers the file to end. Think of it like a tape, with the EOF being the leader at the end, that says "hey I'm here but there's no more data coming".
•
Try/catch is exception handling. For example if you want to open a file and it's not there, it'll throw an exception, which whill bomb the program - but if you try it instead, and the exception is thrown, you can catch it and tell the system what to do. Eg if you try to load a file that's not there, you catch the exception and either cancel loading the file, or create it.
•
While loops are irrelevant to file handling.
Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 2 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 4 weeks ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 2 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 4 weeks ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]