← Back to AQA A-Level Computer Science

    Exam-style questions by topic — AQA A-Level Computer Science

    One question for each of 80 topics. These are written for this specification by MasteryMind. They are not past-paper questions, and they are not from AQA.

    1. Fundamentals of programming

      Given the pseudocode: x ← 5, y ← 2, z ← x MOD y. What is the value of z?

      Practise Fundamentals of programming
    2. Fundamentals of databases

      In the context of database design, what does the term 'atomicity' refer to in the ACID properties?

      Practise Fundamentals of databases
    3. Big Data

      A company uses a NoSQL database to store user interactions from social media posts, including text, images, and video links. Which characteristic of big data is this primarily addressing?

      Practise Big Data
    4. Fundamentals of functional programming

      Consider the following functional code snippet in a pseudo-language: 'foldr (+) 0 [1,2,3]'. What is the result and how does 'foldr' process the list?

      Practise Fundamentals of functional programming
    5. Fundamentals of data structures

      Which of the following best describes the time complexity of inserting an element at the beginning of a singly linked list, assuming you have a reference to the head node?

      Practise Fundamentals of data structures
    6. Fundamentals of algorithms

      Which of the following best describes the purpose of a binary search algorithm?

      Practise Fundamentals of algorithms
    7. Data types

      A program stores a pupil's age as 15 and a pupil's name as "Amara". What does the data type of a value describe about it?

      Practise Data types
    8. Global variables in a programming language

      A programmer replaces a global counter with a local counter inside each subroutine, and the running total across calls is lost. What is the best explanation for the lost total?

      Practise Global variables in a programming language
    9. Arithmetic operations in a programming language

      A program stores the integer 53 in variable a and the integer 12 in variable b. It calculates result as a DIV b, then remainder as a MOD b. What are the values of result and remainder?

      Practise Arithmetic operations in a programming language
    10. Boolean operations in a programming language

      A gate admission rule is (age >= 18) AND (ticket = True). A visitor is 20 years old with ticket = False; another is 16 with ticket = True. Which statement correctly explains why both are refused entry?

      Practise Boolean operations in a programming language
    11. Constants and variables in a programming language

      A program uses the constant MAX_LOGIN_ATTEMPTS = 3 in several places instead of writing 3 each time. Which statement best explains the advantage of this approach?

      Practise Constants and variables in a programming language
    12. Exception handling

      A function validates a password and, when the password is too short, raises a custom exception that the calling code catches to display a specific message to the user. Which statement best describes the advantage of raising a custom exception here rather than returning a plain false value?

      Practise Exception handling
    13. Conceptual data models and entity relationship modelling

      A timetable entity records RoomNumber, DayOfWeek and PeriodNumber. Each room hosts at most one lesson in a given period on a given day. A room is used on several days, and several rooms run lessons in the same period. Which attribute or combination of attributes should be underlined as the entity identifier?

      Practise Conceptual data models and entity relationship modelling
    14. Database design and normalisation techniques

      A relation ENROL(StudentID, ModuleCode, ModuleTitle) has the composite key (StudentID, ModuleCode), and ModuleTitle depends on ModuleCode alone. Which normalisation step removes the problem?

      Practise Database design and normalisation techniques
    15. Client server databases

      A client server database lets several clients read and write the same records at once. Which concurrency control method works by reserving a record exclusively for the one client that is currently changing it, so that any other client must wait until the reservation is released?

      Practise Client server databases
    16. Function type

      A function is declared as f: {2,4,6} → {True,False}. The set {2,4,6} is the domain. Which statement correctly describes the data type relationship?

      Practise Function type
    17. First-class object

      An integer value is a first-class object in a language. Which use of that integer value directly demonstrates that it can appear in an expression?

      Practise First-class object
    18. Function application

      A function takes two integers and returns a single integer. Which notation correctly states the type of this function?

      Practise Function application
    19. Composition of functions

      Functions f: A → B and g: B → C are given, and h = g ○ f. A learner computes h(a) for some a in A. Which order of operations produces the correct value?

      Practise Composition of functions
    20. Functional language programs

      A function applyTwice f x is defined so that it returns f(f(x)). Applying applyTwice to the function that adds 3 and the value 4 gives which result?

      Practise Functional language programs
    21. Analysis

      A developer has a clear written definition of a problem and a full list of requirements. Why is a data model still produced before coding starts?

      Practise Analysis
    22. Design

      What does it mean to say that the design of a software solution is iterative?

      Practise Design
    23. Implementation

      A designer has written an algorithm in pseudocode. Which statement best describes what must happen before a computer can carry out that algorithm?

      Practise Implementation
    24. Evaluation

      In the non-exam assessment (the computing practical project) of an A-level Computer Science course, which skill should the project chiefly assess?

      Practise Evaluation
    25. Data structures

      A word processor needs to store the characters of a document so that the character at any position can be accessed quickly by its index. Which data structure suits this best and why?

      Practise Data structures
    26. Fields, records and files

      A program holds a list of names in memory and must save them into a plain text file that does not yet exist, so the data persists after the program closes. Which sequence of operations correctly saves the names?

      Practise Fields, records and files
    27. Abstract data types/data structures

      A system must store an unknown number of incoming orders that arrive continuously throughout the day, with orders added and removed constantly. Which choice of structure best suits this requirement, and why?

      Practise Abstract data types/data structures
    28. Graphs

      A program must answer the question 'is there an edge between node X and node Y?' as quickly as possible, with no concern for memory. Which representation gives the faster check, and why?

      Practise Graphs
    29. Dictionaries

      A search engine stores, for each word, a list of document numbers containing that word, for example "grass": [1, 4, 9]. A user searches for "grass". What does the engine do with this dictionary?

      Practise Dictionaries
    30. Binary search

      A sorted array holds 1024 items. A binary search repeatedly halves the interval until one item remains. How many halvings are needed to reduce the interval to one item?

      Practise Binary search
    31. Binary tree search

      A binary search tree is built by inserting values in ascending order 1, 2, 3, ..., n. A search for the largest value is then made. Which statement correctly describes the time complexity of this search?

      Practise Binary tree search
    32. Bubble sort

      A bubble sort is applied to the list 6, 2, 5, 3. After the first complete pass, comparing and swapping adjacent items from left to right, what is the list?

      Practise Bubble sort
    33. Dijkstra’s shortest path algorithm

      In Dijkstra's algorithm, which node is selected next to be processed at each step?

      Practise Dijkstra’s shortest path algorithm
    34. Composition

      Procedures inc(x) returns x + 1 and triple(x) returns 3 * x. A programmer builds a compound procedure k so that k(x) returns inc(triple(x)), and then evaluates k(k(2)). What is the final value?

      Practise Composition
    35. Automation

      Two models of a library borrowing system are proposed. Model P stores each loan as a record of book ID, borrower ID and due date. Model Q stores the same fields plus the borrower's favourite genre. Which evaluation is most defensible for a system that only needs to track overdue loans?

      Practise Automation
    36. Following and writing algorithms

      A sequence of assignments is: p ← 4; q ← p × 2; p ← q − p; q ← p + q. A student reorders the last two statements so that q ← p + q runs before p ← q − p. Assume the variables start with no values other than those assigned in the sequence. What are the final values of p and q in the reordered version?

      Practise Following and writing algorithms
    37. Abstraction

      A model of a road network for route planning stores junctions and the roads between them, but omits the colour of each road surface. Why is this omission appropriate?

      Practise Abstraction
    38. Information hiding

      A Temperature class stores its value in kelvin privately and offers getCelsius and getFahrenheit methods. A user of the class never sees the kelvin field. Why does this design apply information hiding?

      Practise Information hiding
    39. Functional abstraction

      A programmer takes the fixed calculation 8 + 3 and rewrites it as add(x, y), which returns x + y. The body of add still shows the addition being carried out. Under the AQA definition of procedural abstraction, what has the programmer produced?

      Practise Functional abstraction
    40. Data abstraction

      A stack is implemented as an array of capacity 4 with a top pointer that holds the index of the topmost item, and the stack is empty when the top pointer is −1. The stack currently has top pointer 3, so it is full. A pop is performed and then a push of item Z. What is the resulting top pointer and where is Z stored?

      Practise Data abstraction
    41. Decomposition

      A program must read a list of exam marks, calculate the average, and print a grade for each student. Which of the following is the best example of procedural decomposition for this task?

      Practise Decomposition
    42. Finite state machines (FSMs) with and without output

      A Mealy machine has states S0 and S1. In S0, input 1 goes to S1 producing output 0, and input 0 stays in S0 producing output 1. In S1, input 0 goes to S0 producing output 1, and input 1 stays in S1 producing output 0. Starting in S0, what output sequence is produced by inputs 1, 0?

      Practise Finite state machines (FSMs) with and without output
    43. Backus-Naur Form (BNF)/syntax diagrams

      Which feature of BNF lets it describe nested structures such as balanced brackets, which a regular expression with no memory cannot describe?

      Practise Backus-Naur Form (BNF)/syntax diagrams
    44. Comparing algorithms

      A linear search over n items takes up to n comparisons; a binary search over the same sorted n items takes about log₂ n comparisons. For n = 1024, how many comparisons does each take in the worst case, and which is better?

      Practise Comparing algorithms
    45. Classification of algorithmic problems

      Which of these time complexities would make a problem tractable?

      Practise Classification of algorithmic problems
    46. Computable and non-computable problems

      A student claims that every well-defined problem will be solved once computers become fast enough. Which statement correctly challenges this claim?

      Practise Computable and non-computable problems
    47. Halting problem

      A checker tool is built to decide, for any program and input, whether the program halts. It answers correctly for a fixed list of 10,000 known programs, but for any program not on the list it sometimes gives the wrong answer. A developer proposes extending the tool with a much larger list of known results. Why does this proposal fail to solve the underlying problem?

      Practise Halting problem
    48. Integer numbers

      The set ℤ contains the whole numbers …, -3, -2, -1, 0, 1, 2, 3, … Exactly one of the following values is a member of ℤ. Which one?

      Practise Integer numbers
    49. Counting and measurement

      A program records the number of people in an auditorium and the room temperature in degrees Celsius, to one decimal place (for example, 21.4 °C). Which combination of data types is most appropriate for storing these two values?

      Practise Counting and measurement
    50. Bits and bytes

      A bitmap image uses a 24-bit colour value for each pixel. The image contains 1200 pixels. How many bytes are needed to store the colour data for the whole image?

      Practise Bits and bytes
    51. Absolute and relative errors

      A true value of 50 is stored as 49. Using the true value as the base, what is the relative error written as a percentage?

      Practise Absolute and relative errors
    52. Character form of a decimal digit

      A file contains the two characters "4" and "2" stored as ASCII character codes, one after another. Which statement correctly describes what is stored?

      Practise Character form of a decimal digit
    53. ASCII and Unicode

      A programmer must choose a character coding system for a document containing English letters, accented European letters and Chinese characters. Which description best explains how Unicode relates to ASCII when coding this character data?

      Practise ASCII and Unicode
    54. Error checking and correction

      A code uses the rule that the final check digit equals the sum of the preceding digits, reduced to a single digit by taking the remainder after dividing by 10. For the digits 3, 4, 2 what check digit should be appended?

      Practise Error checking and correction
    55. Bit patterns, images, sound and other data

      A greyscale image uses a 2-bit code for each pixel, where 00 represents black, 01 represents dark grey, 10 represents light grey and 11 represents white. A row of four pixels is stored as the bit sequence 10 00 11 01. What does this row show, from left to right?

      Practise Bit patterns, images, sound and other data
    56. Encryption

      A message is encrypted by writing it in rows of five letters and then reading the letters down the columns. Which principle does this cipher use?

      Practise Encryption
    57. Analogue and digital

      A sound wave is captured by a microphone. An engineer claims that increasing the number of bits used to store each sample makes the stored signal 'more analogue'. Which evaluation of this claim is correct?

      Practise Analogue and digital
    58. Analogue/digital conversion

      A 10-bit ADC has an input range from 0 V to 5 V. The smallest change in input voltage it can distinguish is the range divided by the number of discrete levels, where an n-bit ADC has 2ⁿ levels. What is this smallest distinguishable change?

      Practise Analogue/digital conversion
    59. Bitmapped graphics

      Which calculation gives the storage requirements in bits for a bitmapped image?

      Practise Bitmapped graphics
    60. Digital representation of sound

      A recording uses a sample resolution of 4 bits. How many distinct amplitude levels can each sample represent?

      Practise Digital representation of sound
    61. Data compression

      A user compresses a document and later decompresses it to find every character exactly as before. Which type of compression was used?

      Practise Data compression
    62. Classification of software

      A hospital already runs an operating system and a backup utility. It now buys a patient-records program that staff use to book appointments. Which statement best explains why this new program is classed as application software rather than the other two types?

      Practise Classification of software
    63. Classification of programming languages

      An engineer must write a device driver that works directly with the processor's internal storage locations and memory addresses. Which reasoning best justifies choosing a low-level language for this task?

      Practise Classification of programming languages
    64. Internal hardware components of a computer

      What is the main purpose of an I/O controller in a computer system?

      Practise Internal hardware components of a computer
    65. Addressing modes

      A processor executes the instruction LDR R1, 200 using direct addressing. What does the processor do to complete the instruction?

      Practise Addressing modes
    66. Interrupts

      What is the role of an interrupt in a computer system?

      Practise Interrupts
    67. Factors affecting processor performance

      A system designer can fit either a 20-bit or a 24-bit address bus. Each memory location holds one byte. Taking 1 MiB = 2^20 bytes, what is the difference in maximum directly addressable memory capacity, in MiB, between the two designs?

      Practise Factors affecting processor performance
    68. Input and output devices

      Which sequence correctly describes how a laser printer forms an image on paper?

      Practise Input and output devices
    69. Individual (moral), social (ethical), legal and cultural issues and opportunities

      A company is the data controller for its customers' personal data under the UK GDPR. It sells that data to advertisers without informing customers or having any lawful basis for the processing. Which category of issue is most directly raised by this act?

      Practise Individual (moral), social (ethical), legal and cultural issues and opportunities
    70. Communication methods

      A receiver samples an asynchronous serial line continuously at the agreed bit rate, but characters arrive at unpredictable times. Explain why framing each character with start and stop bits allows correct reception.

      Practise Communication methods
    71. Communication basics

      A link has a baud rate of 2400 and uses 8 distinct signal levels. Calculate the bit rate, and explain why it differs from the baud rate.

      Practise Communication basics
    72. Internet security

      In the TCP/IP model, which layer is responsible for logical addressing and routing packets between networks?

      Practise Internet security
    73. Client server model

      A script calls a REST endpoint that returns data in JSON. Which sequence correctly describes how the script obtains and uses the data?

      Practise Client server model
    74. IP address structure

      Two devices have IPv4 addresses 192.168.10.20 and 192.168.10.75, and both use the subnet mask 255.255.255.0. What does this tell you about them?

      Practise IP address structure
    75. Dynamic Host Configuration Protocol (DHCP)

      What is the main purpose of DHCP on a network?

      Practise Dynamic Host Configuration Protocol (DHCP)
    76. Fundamentals of data representation

      Which of the following binary numbers represents the decimal value 13 in two's complement using 8 bits?

      Practise Fundamentals of data representation
    77. Fundamentals of computer systems

      What is the purpose of the program counter (PC) in the fetch-execute cycle?

      Practise Fundamentals of computer systems
    78. Fundamentals of computer organisation and architecture

      Which of the following best describes the difference between Von Neumann and Harvard architectures?

      Practise Fundamentals of computer organisation and architecture
    79. Consequences of uses of computing

      A company uses an AI recruitment tool to screen job applications. The tool is trained on historical hiring data from the company, which shows that successful candidates were predominantly male. As a result, the tool systematically filters out female applicants. Which of the following best describes this consequence of using computing?

      Practise Consequences of uses of computing
    80. Fundamentals of communication and networking

      Which of the following best describes the difference between a circuit-switched and a packet-switched network?

      Practise Fundamentals of communication and networking

    Practise every topic and see your weak topics.

    Start free

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge