Skip to content

1.2.4 Types of Programming Language Exam Questions

Paper 1 · Computer Systems · 0 past paper questions · 8 practice questions · 26 marks

Exam questions for 1.2.4 Types of programming language

0 OCR past paper questions and 8 practice questions (26 marks) with mark schemes

Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.

Download Questions & Mark Scheme (PDF)

Past paper questions

  1. Question 1Practice question · H446/01 style3 marks

    Describe the characteristics of the procedural programming paradigm.

    Show mark scheme
    • The program is a sequence of instructions / statements executed in order • Code is organised into procedures / functions (subroutines) • Uses the constructs sequence, selection and iteration • Data is held in variables and passed between procedures as parameters (3 marks – 1 per point, max 3)
    Mark yourself: how many marks did you get?
    / 3
  2. Question 2Practice question · H446/01 style4 marks

    A Little Man Computer program is shown below. INP STA first INP ADD first OUT HLT first DAT State the output of the program when the inputs are 5 and then 3, and explain what the program does.

    Show mark scheme
    • Output: 8 • The first input is stored in the memory location labelled first • The second input is added to the value stored in first • The result is output (before the program halts) (4 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 4
  3. Question 3Practice question · H446/01 style4 marks

    Describe the difference between direct addressing and indirect addressing. Use the instruction ADD 12 to illustrate your answer.

    Show mark scheme
    Direct addressing: • The operand is the address of the data to use • So ADD 12 adds the contents of memory location 12 to the accumulator Indirect addressing: • The operand is the address of a location that holds the address of the data • So ADD 12 adds the contents of the location whose address is stored in location 12 (4 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 4
  4. Question 4Practice question · H446/01 style3 marks

    Explain how indexed addressing works and describe a situation in which it is useful.

    Show mark scheme
    • The address of the data is found by adding the operand to the value held in an index register • Changing the value in the index register accesses consecutive memory locations • Useful for iterating through / processing each element of an array or list (3 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 3
  5. Question 5Practice question · H446/01 style4 marks

    A program models vehicles using the classes Vehicle, Car and Lorry. Explain how inheritance and polymorphism could be used in this program.

    Show mark scheme
    Inheritance: • Car and Lorry inherit from (are subclasses of) Vehicle • They share the attributes and methods defined in Vehicle, e.g. registration, numberOfWheels, so the code is not repeated Polymorphism: • A method such as calculateTax() defined in Vehicle is overridden in Car and Lorry so that it behaves differently for each • The same method call can be made on any Vehicle object and the correct version for that object runs (4 marks – 1 per point, max 2 for each)
    Mark yourself: how many marks did you get?
    / 4
  6. Question 6Practice question · H446/01 style3 marks

    Explain what is meant by encapsulation and why it is used in object-oriented programming.

    Show mark scheme
    • Attributes are declared private so they cannot be accessed directly from outside the class • They are read or changed only through public methods (getters / setters) • This prevents data from being changed accidentally or set to invalid values, keeping the object consistent and reducing bugs (3 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 3
  7. Question 7Practice question · H446/01 style2 marks

    Explain why immediate addressing is used in some assembly language instructions.

    Show mark scheme
    • The operand is the actual value to use, not an address • No memory access is needed to fetch the data, so the instruction is faster / useful for constants (2 marks – 1 per point)
    Mark yourself: how many marks did you get?
    / 2
  8. Question 8Practice question · H446/01 style3 marks

    Explain why programming paradigms other than the procedural paradigm are needed.

    Show mark scheme
    • Different problems suit different ways of thinking / structuring a solution • Object-oriented languages model real-world objects and support reuse through classes and inheritance • Declarative languages (e.g. SQL) describe what result is wanted rather than how to compute it • Assembly language gives direct control of the hardware where performance or low-level access matters (3 marks – 1 per point, max 3)
    Mark yourself: how many marks did you get?
    / 3
Key Exam Tips for 1.2.4
  • 1Addressing modes: Immediate (#5), Direct (address 50), Indirect (@50), Indexed (100,X)
  • 2OOP concepts: Class (blueprint), Object (instance), Encapsulation (private data, public methods)
  • 3Inheritance: Child inherits from parent ("is-a" relationship)
  • 4Polymorphism: Same method call, different behaviours in different classes
General Exam Advice
  • •Practice answering questions under timed conditions
  • •Check your answers against the mark scheme carefully
  • •Focus on understanding the marking points, not just memorising answers
  • •Review past paper questions from multiple years to spot patterns