A Level Computer Science (A2) chapter 8: Further Programming MCQs with answers

By Team Megalecture · Updated 4 Nov 2026

59 exam-style questions on Further Programming, each with the answer and a short explanation. Ten of them are below to try. The chapter test draws ten fresh questions each time and is marked the moment you finish, with your score by topic.

59 questions · 2 topics · 10 per test

Test this chapter freeAll A Level Computer Science (A2) chapters

What chapter 8 covers

Ten Further Programming questions with answers

Try each one, then open the answer. These ten stay the same; the test draws new ones every time.

1. In the instruction LDM #75, which addressing mode is used?

  1. A
    direct
  2. B
    indirect
  3. C
    indexed
  4. D
    immediate
Show answer

Answer: D. In immediate addressing the operand is the value itself, so 75 is loaded straight into the accumulator with no memory access for the operand.

2. A file Scores.txt holds the values 12, 7, 20 and 5, one on each line. What is output?
Total ← 0
OPENFILE "Scores.txt" FOR READ
WHILE NOT EOF("Scores.txt")
   READFILE "Scores.txt", Value
   Total ← Total + INT(Value)
ENDWHILE
CLOSEFILE "Scores.txt"
OUTPUT Total

  1. A
    44
  2. B
    12
  3. C
    24
  4. D
    5
Show answer

Answer: A. The loop reads every line until the end of the file, adding each value: 12 + 7 + 20 + 5 = 44. EOF becomes TRUE only after the last line has been read.

3. A Team class has an attribute that holds a list of Player objects. Which relationship between the classes is this?

  1. A
    inheritance: a Team is a Player
  2. B
    polymorphism: a Team behaves as a Player
  3. C
    containment (aggregation): a Team has Players
  4. D
    encapsulation: a Team hides its Players
Show answer

Answer: C. When objects of one class are held inside another it is containment (aggregation), a "has a" relationship. Inheritance is an "is a" relationship, and a team is not a kind of player.

4. A file Log.txt already contains 50 lines. A program runs OPENFILE "Log.txt" FOR WRITE, writes one line and then closes the file. How many lines does the file contain?

  1. A
    1
  2. B
    51
  3. C
    50
  4. D
    0
Show answer

Answer: A. Opening an existing file for write mode discards its previous contents, so only the one new line remains. Append mode is used to keep the existing lines and add to the end (giving 51).

5. A library system has a class Book. Which of these is best written as a method rather than as an attribute?

  1. A
    Title, the name of the book
  2. B
    ISBN, the unique number of the book
  3. C
    Borrow, which marks the book as on loan
  4. D
    Author, the writer of the book
Show answer

Answer: C. Attributes hold data about the object (title, ISBN, author). A method is an action the object can perform or have done to it, such as being borrowed.

6. Which constructs are the basis of structured programming?

  1. A
    classes, objects and inheritance
  2. B
    sequence, selection and iteration
  3. C
    facts, rules and goals
  4. D
    registers, opcodes and operands
Show answer

Answer: B. Structured programs are built from sequence, selection (IF, CASE) and iteration (loops), usually organised into procedures and functions. Classes belong to OOP and facts and rules belong to declarative programming.

7. The knowledge base below is used. Variables start with a capital letter.parent(amir, sara).
parent(amir, bilal).
parent(sara, hina).
parent(bilal, zain).
male(amir).
male(bilal).
male(zain).
female(sara).
female(hina).
Which rule correctly defines mother(X, Y), meaning that X is the mother of Y?

  1. A
    mother(X, Y) IF female(X) OR parent(X, Y)
  2. B
    mother(X, Y) IF female(Y) AND parent(X, Y)
  3. C
    mother(X, Y) IF female(X) AND parent(X, Y)
  4. D
    mother(X, Y) IF male(X) AND parent(X, Y)
Show answer

Answer: C. A mother is a parent who is female, so both conditions must hold (AND) for the same X. OR would make any female a mother; testing Y instead of X, or male, would define something else.

8. Which addressing mode is used when the value in the instruction is the address of a location that holds the address of the data?

  1. A
    immediate
  2. B
    direct
  3. C
    indirect
  4. D
    relative
Show answer

Answer: C. With indirect addressing the location named in the instruction holds another address, which is where the data is. It is used for pointers.

9. A random file Stud.dat stores fixed-length records of 20 bytes, with the first record being record 1 at byte 0. In which byte does record 7 start?

  1. A
    120
  2. B
    140
  3. C
    7
  4. D
    126
Show answer

Answer: A. The records before record 7 take up 6 × 20 = 120 bytes, so it starts at byte 120. Using 7 × 20 = 140 would skip one record too many.

10. Class Sportscar is created as a subclass of class Car and automatically has all of the attributes and methods of Car. Which OOP term describes this?

  1. A
    containment
  2. B
    inheritance
  3. C
    polymorphism
  4. D
    encapsulation
Show answer

Answer: B. Inheritance lets a subclass take the attributes and methods of its parent class and add or change its own. Containment would be an object of another class held as an attribute.

Start the chapter testAbout the A Level Computer Science (A2) test

Read the notes for this chapter

Ways to practise this chapter

Further Programming: questions students ask

How many Further Programming MCQs are there?

59, each with the answer and a short explanation, across 2 topics: Programming Paradigms, File Processing and Exception Handling. Every chapter test draws ten of them, so you can take it many times.

Is the A Level Computer Science (A2) chapter 8 test free?

Yes. The test, the answers and the explanations are free and need no sign-up. Sign in only if you want your scores kept across devices.

How is the chapter test marked?

The moment you press Finish: your score, the right answer and an explanation for every question, and the ones you got wrong saved in My mistakes to retry.

Keep going

← Chapter 7: Computational thinking and Problem-solvingAll chaptersStuck? Ask a question