Bee Learnt Logo
Bee Learnt
FeatureBrowse allPricingAboutSupport
Bee Learnt

Bee Learnt gives South African Grade 10–12 learners a cleaner route from classwork to NSC readiness — with parents and tutors supporting the journey.

WhatsApp: 0685537312

Support email: admin@beelearnt.co.za

Learn
FeaturesBrowse subjectsPricing
Get started
Create accountSign inContact support
Company
About Bee LearntAdvertisingContact
Legal
Privacy policyTerms of serviceCookie policyAd choices

© 2026 Bee Learnt. All rights reserved.

CAPS aligned · Grades 10–12 · NSC ready

Privacy choices

Allow analytics and advertising services to help us understand site usage and measure campaigns.

Privacy Policy
  1. Subjects
  2. /
  3. Information Technology
  4. /
  5. Information Technology Grade 12 — Practical
  6. /
  7. Functions and files
  8. /
  9. Arrays and file handling
Grade 12 · Practical

Arrays and file handling

Functions and files · about 3 min

Educational overview for Arrays and file handlingVisual overview: Arrays and file handling
1 MIN READ
2 study sections · pause after each one and recall the key idea

Grade 12 combines arrays with text files so programs can process and persist bulk data.

Key points
  • Declare typed arrays and process them with loops (total, search, sort, count).
  • Text files: `AssignFile(f, name)`, then `Reset` (read) / `Rewrite` (new write) / `Append` (add to end).
  • Read line by line with `Readln`; loop `while not Eof(f) do`; write with `Writeln`; ALWAYS `CloseFile(f)` when done.
  • Check a file exists with `FileExists(name)` before opening to read.
Key terms
  • Array — an indexed collection processed with loops.
  • EOF — end-of-file; the marker that stops a read loop.
EXAM TIP

the file-read template is FileExists → AssignFile → Reset → while not Eof do Readln → CloseFile. Forgetting CloseFile loses marks.


Previous

Procedures and functions