The subroutine SUBSTRING extracts characters from a given string.
For example, SUBSTRING(2, 5, 'Algorithm') would return 'gori'.
The variable y is assigned a value using the statement:
y ← SUBSTRING(3, 6, city)
Using Figure 1, what is the value of y?
Figure 1
county ← 'Yorkshire'
city ← 'Manchester'
stadium ← 'Old Trafford'
team ← 'Red Devils'
nche
ches
hester
anch
89 exam-style questions on AQA GCSE Computer Science String handling operations in a programming language. Each one has a worked solution and a mark scheme showing where the marks go.