Past-paper question · 2023 May-June · Paper 41 · Q3(a)
Question 3(a) 2023 · May-June · Paper 41 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
Question 1
mark each
Question 3
✓
(Global) Animal array (with 20 string elements)
✓
(Global) Colour array (with 10 string elements)
✓
(Global) AnimalTopPointer and ColourTopPointer initialised to 0
✓
Example program code:
✓
Java
✓
public
✓
static
✓
String[] Animal = new String[20];
✓
public
✓
static
✓
String[] Colour = new String[10];
✓
public
✓
static
✓
Integer AnimalTopPointer = 0;
✓
public
✓
static
✓
Integer ColourTopPointer = 0;
✓
VB.NET
✓
Dim Animal(0 to 19) As String
✓
Dim Colour(0 to 9) As String
✓
Dim AnimalTopPointer As Integer = 0
✓
Dim ColourTopPointer As Integer = 0
✓
Python
✓
Animal = [] #20 elements
✓
Colour = [] #10 elements
✓
global AnimalTopPointer
✓
global ColourTopPointer
✓
AnimalTopPointer = 0
✓
ColourTopPointer = 0
✓
9618/41
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks
Show text version of question
Question 3
Part (a)
Question 3
A program implements two stacks using 1D arrays. One stack stores the names of colours. One
stack stores the names of animals.
Part (a)
The program contains the following global arrays and variables:
- 1D array Animal to store the names of up to 20 animals.
- 1D array Colour to store the names of up to 10 colours.
- AnimalTopPointer to point to the next free space in the array Animal, initialised to 0.
- ColourTopPointer to point to the next free space in the array Colour, initialised to 0.
Write program code to declare the global arrays and variables.
Save your program as Question3_J2023.
Copy and paste the program code into part 3(a) in the evidence document.
[3]
Topic relevance
Why this question appears here
86% assigned-topic match · Data types and structures › Arrays
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9618_s23_qp_41.pdf
Keep practising this topic
Related searches for this question
Computer Science For First Examination In 2021 9618 topical past papers
Computer Science For First Examination In 2021 9618 topical questions with answers
AS & A Level Computer Science For First Examination In 2021 topical past papers
Computer Science For First Examination In 2021 9618 Data types and structures topical questions
Arrays past paper questions
Computer Science For First Examination In 2021 9618 2023 May-June question
