Imperative programming

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2017/imperative-programming

This is the 14 June 2017 preliminary examination. All 38 printed subparts are answered. Source paper: released examination archive, member a10098w1-2.pdf.
Questions 1–4 use explicit pseudocode: array segments are half-open, a var parameter can be reassigned in the caller, newly allocated cells are initialized by the code, and integer arithmetic is exact. Assume a radix at least two, finite valid acyclic linked lists, and a total ordering where keys are compared. Implementations with fixed-width temporary integers need a radix and bounds that avoid overflow. Questions 5–8 use the Scala 2 API style of the source, with separate namespaces for independent examples. Scala code is not claimed to have been compiled in the current environment.

New to topics? Read the docs here!