Problem Solving and Programming | OCR A-Level Computer Science (H446)

Problem Solving and Programming

  • 119 questions
  • 10 subtopics
  • Component 02: Algorithms and programming
  • Component 02

Problem Solving and Programming is examined on component 02 of OCR Computer Science, Algorithms and programming.

110 recall questions across 10 subtopics.

Sample questions from Problem Solving and Programming

Answer each one closed book first, then open the answer.

  1. Programming techniques: Programming constructs

    Why must a file be closed after a program has finished reading or writing it?

    Show the answer
    Closing releases the file for other programs and makes sure any data still held in a buffer is actually written to storage.
  2. Programming techniques: Programming constructs

    What do the MOD and DIV operators return?

    Show the answer
    MOD returns the remainder of an integer division and DIV returns the whole-number quotient, so 12 MOD 5 is 2 and 12 DIV 5 is 2.

The 10 subtopics

One subtopic is one session. Work down the list.

Subtopic What it covers Questions
Programming techniques: Programming constructs Recall questions on sequence, branching and iteration, count-controlled and condition-controlled loops, tracing and nested loops, infinite loops, elseif order and switch/case, plus reading and writing text files, string length and substrings, and the MOD, DIV and ^ operators. 21
Programming techniques: Recursion Recall questions on recursive subroutines, base and general cases, tracing factorial calls, the call stack and unwinding, stack overflow, recursion depth on large data, recursion compared with iteration, and slow recursive Fibonacci. 11
Programming techniques: Global and local variables Recall questions on the scope and lifetime of variables, local and global variables, predicting output when a local variable shadows a global one, why globals are discouraged and when they are justified, and fixing out-of-scope values. 8
Programming techniques: modularity, functions and procedures, and parameter passing Recall questions on modularity and its benefits, functions and procedures, what a caller needs to know, reusable subroutines, side effects, passing parameters by value and by reference with traces, returning two results, and parameters versus arguments. 15
Programming techniques: Use of an IDE to develop/debug a program Recall questions on integrated development environments, breakpoints, stepping into and over, watch windows, the call stack view, syntax and error highlighting, auto-completion, refactoring tools, and debugging logic errors and stack overflows. 12
Programming techniques: Use of object oriented techniques Recall questions on classes and objects, attributes and methods, constructors, separate object state, encapsulation with private attributes and get and set methods, inheritance and superclass constructors, polymorphism, and when object-oriented design fits. 11
Computational methods: solvable problems, problem recognition, decomposition, and divide and conquer Recall questions on features that make a problem solvable or unsolvable by computational methods, problem recognition, problem decomposition, divide and conquer, binary search comparisons, and algorithms that divide and combine. 11
Computational methods: Use of abstraction and backtracking Recall questions on abstraction in computational solutions and the danger of abstracting too much, abstraction with decomposition, backtracking in mazes and the four queens problem, its limitations, and problems that suit backtracking. 8
Computational methods: data mining, heuristics and performance modelling Recall questions on data mining and its limitations, heuristics in route planning, satnavs and antivirus detection, what heuristics trade away, performance modelling with worked examples, and when modelling is the only sensible option. 12
Computational methods: pipelining, visualisation and choosing a method Recall questions on pipelining outside the processor and what limits it, visualisation and its limitations, backtracking compared with heuristics, choosing the computational method that fits a problem, and combining methods in a satnav. 10
Problem Solving and Programming is 119 of the 1,549 questions in the guide.Get the guide, £9

How the guide is worked

Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.

  1. Step 1 · Closed book

    Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.

  2. Step 2 · Open book

    Go back to the top. Read each printed answer and write it out in full, including the ones you had right.

  3. Step 3 · Closed book again

    Same questions, same order, from memory. The gap between pass one and pass three is the session result.

Read the full method, the return schedule and the research behind it.

Nearby topics

All 16 topics Guide overview

OCR A-Level Computer Science Active Recall Guide

Every topic, not just this one. 1,549 questions with their answers.

£9 GBP
Get the guide

Digital PDF, sent to the email address on your order.