Skip to content

Types of programming language: OCR A‑Level Computer Science questions

Every OCR A-Level Computer Science exam question on 1.2.4 Types of programming language, 2021–2025, with its mark scheme and examiner’s report.

Find questions593
Calculations

593 questions

  1. Q4(a)

    June 2025 · Paper 1

    The whole paper ↗
    June 2025 Paper 1, question 4(a): State the LMC command that would be used for each description given in the table. Description LMC Command Load the value stored in the memory address into the a
  2. Q4(b)

    June 2025 · Paper 1

    The whole paper ↗
    June 2025 Paper 1, question 4(b): Kofi has been asked to write a program that inputs two numbers and then outputs the largest of the two numbers. Write the code for this program using the LMC in
  3. Q4(c)

    June 2025 · Paper 1

    The whole paper ↗
    June 2025 Paper 1, question 4(c): Kofi is a software engineer and has been asked to write some code using the Little Man Computer (LMC) instruction set. (c)* Kofi is working on a number of proje
  4. Q1(d)(i)

    June 2024 · Paper 1

    The whole paper ↗
    June 2024 Paper 1, question 1(d)(i): State the five outputs that Orla’s code would give. Output 1 Output 2 Output 3 Output 4 Output 5 [3]
  5. Q1(d)(ii)

    June 2024 · Paper 1

    The whole paper ↗
    June 2024 Paper 1, question 1(d)(ii): Orla has rewritten her LMC code to fix the error and added an additional DAT. Complete the LMC code to output the first five correct numbers in the Fibonacci se
  6. Q1(e)

    June 2024 · Paper 1

    The whole paper ↗
    June 2024 Paper 1, question 1(e): In Orla’s LMC code, she used direct memory addressing. Give three other modes of memory addressing. 1 2 3 [3]
  7. Q1(f)

    June 2024 · Paper 1

    The whole paper ↗
    June 2024 Paper 1, question 1(f): Since the development of high level languages, the use of assembly languages has reduced. Give two reasons why in some circumstances programmers will choose to
  8. Q9

    June 2024 · Paper 1

    The whole paper ↗
    June 2024 Paper 1, question 9: OCR DogCare look after dogs while their owners are at work. They use a program developed in an object-oriented paradigm to store details about each dog. Each do
  9. Q4(c)

    June 2024 · AS Paper 1

    The whole paper ↗
    June 2024 AS Paper 1, question 4(c): The pseudocode algorithm here will take in two numbers from the user, multiply them together using addition and output the result. For example, 4 multiplied by
  10. Q4(a)

    June 2023 · Paper 1

    The whole paper ↗
    June 2023 Paper 1, question 4(a): Describe two differences between assembly language and high-level languages. Difference 1 Difference 2 [4]
  11. Q9(b)(iii)

    June 2023 · Paper 2

    The whole paper ↗
    June 2023 Paper 2, question 9(b)(iii): Describe the object-oriented programming technique being used in part 9(b)(ii). [2]
  12. Q9(e)

    June 2023 · Paper 2

    The whole paper ↗
    June 2023 Paper 2, question 9(e): Describe two benefits of using an object-oriented paradigm rather than a procedural paradigm. 1 2 [4]
  13. Q1(c)(i)

    June 2022 · Paper 1

    The whole paper ↗
    June 2022 Paper 1, question 1(c)(i): The program shown in Fig. 1 is run once using three different inputs. Therefore, while the program is running once, it will output the updated total three times
  14. Q1(c)(ii)

    June 2022 · Paper 1

    The whole paper ↗
    June 2022 Paper 1, question 1(c)(ii): Write LMC code that will reset the value of the memory location labelled total to zero and then stop the program. [4]
  15. Q2(g)(i)

    June 2022 · Paper 1

    The whole paper ↗
    June 2022 Paper 1, question 2(g)(i): Write program code or pseudocode to declare the class video and initialise the required attributes as private. You should include both the attribute definitions
  16. Q2(g)(ii)

    June 2022 · Paper 1

    The whole paper ↗
    June 2022 Paper 1, question 2(g)(ii): A public method called updateviews() will update the number of views after a video has been viewed. This method is defined inside the video class. Write program
  17. November 2021 Paper 1, question 6(a)(ii): Explain how the accumulator is used when the line BRP pos is executed. [2]
  18. Q6(b)

    November 2021 · Paper 1

    The whole paper ↗
    November 2021 Paper 1, question 6(b): Complete the table below to show the output(s) from this program given the inputs. Inputs Output(s) 12, 5 18, 2 16, 4 3, 7 [4]
  19. Q6(c)

    November 2021 · Paper 1

    The whole paper ↗
    November 2021 Paper 1, question 6(c): Write an algorithm using pseudocode that has the same functionality as the code in Fig. 1. [4]
  20. Q6(d)

    November 2021 · Paper 1

    The whole paper ↗
    November 2021 Paper 1, question 6(d): A program written using the Little Man Computer instruction set is shown in Fig. 1. INP STA numone INP STA numtwo main LDA numone SUB numtwo BRP pos notpos LDA
All 21 questions on Types of programming language, as a list
  1. June 2025, Paper 1, Q4(a) (3 marks): State the LMC command that would be used for each description given in the table. Description LMC Command Load the value stored in the memory address into the a
  2. June 2025, Paper 1, Q4(b) (4 marks): Kofi has been asked to write a program that inputs two numbers and then outputs the largest of the two numbers. Write the code for this program using the LMC in
  3. June 2025, Paper 1, Q4(c) (12 marks): Kofi is a software engineer and has been asked to write some code using the Little Man Computer (LMC) instruction set. (c)* Kofi is working on a number of proje
  4. June 2024, Paper 1, Q1(d)(i) (3 marks): State the five outputs that Orla’s code would give. Output 1 Output 2 Output 3 Output 4 Output 5 [3]
  5. June 2024, Paper 1, Q1(d)(ii) (4 marks): Orla has rewritten her LMC code to fix the error and added an additional DAT. Complete the LMC code to output the first five correct numbers in the Fibonacci se
  6. June 2024, Paper 1, Q1(e) (3 marks): In Orla’s LMC code, she used direct memory addressing. Give three other modes of memory addressing. 1 2 3 [3]
  7. June 2024, Paper 1, Q1(f) (2 marks): Since the development of high level languages, the use of assembly languages has reduced. Give two reasons why in some circumstances programmers will choose to
  8. June 2024, Paper 1, Q9 (5 marks): OCR DogCare look after dogs while their owners are at work. They use a program developed in an object-oriented paradigm to store details about each dog. Each do
  9. June 2024, AS Paper 1, Q4(c) (6 marks): The pseudocode algorithm here will take in two numbers from the user, multiply them together using addition and output the result. For example, 4 multiplied by
  10. June 2023, Paper 1, Q4(a) (4 marks): Describe two differences between assembly language and high-level languages. Difference 1 Difference 2 [4]
  11. June 2023, Paper 2, Q9(b)(iii) (2 marks): Describe the object-oriented programming technique being used in part 9(b)(ii). [2]
  12. June 2023, Paper 2, Q9(e) (4 marks): Describe two benefits of using an object-oriented paradigm rather than a procedural paradigm. 1 2 [4]
  13. June 2022, Paper 1, Q1(c)(i) (3 marks): The program shown in Fig. 1 is run once using three different inputs. Therefore, while the program is running once, it will output the updated total three times
  14. June 2022, Paper 1, Q1(c)(ii) (4 marks): Write LMC code that will reset the value of the memory location labelled total to zero and then stop the program. [4]
  15. June 2022, Paper 1, Q2(g)(i) (7 marks): Write program code or pseudocode to declare the class video and initialise the required attributes as private. You should include both the attribute definitions
  16. June 2022, Paper 1, Q2(g)(ii) (2 marks): A public method called updateviews() will update the number of views after a video has been viewed. This method is defined inside the video class. Write program
  17. November 2021, Paper 1, Q6(a)(ii) (2 marks): Explain how the accumulator is used when the line BRP pos is executed. [2]
  18. November 2021, Paper 1, Q6(b) (4 marks): Complete the table below to show the output(s) from this program given the inputs. Inputs Output(s) 12, 5 18, 2 16, 4 3, 7 [4]
  19. November 2021, Paper 1, Q6(c) (4 marks): Write an algorithm using pseudocode that has the same functionality as the code in Fig. 1. [4]
  20. November 2021, Paper 1, Q6(d) (12 marks): A program written using the Little Man Computer instruction set is shown in Fig. 1. INP STA numone INP STA numtwo main LDA numone SUB numtwo BRP pos notpos LDA
  21. November 2021, Paper 1, Q7(c)(i) (3 marks): State the meaning of each of the following terms: Object Method Attribute [3] Each worker has a name and an attendance figure which can be between 0 and 100.

Questions, mark schemes and examiner’s reports are © OCR, from their published past papers. Plumi isn’t affiliated with any exam board. Want whole papers? Full past papers.

Rather write your answers by hand on iPad? Plumi marks them against the same mark schemes.