An algorithm is shown in the pseudocode below.
1 minerals ← ['Quartz', 'Gypsum', 'Feldspar']
2 min1 ← 'Calcite'
3 min2 ← 'Fluorite'
4 OUTPUT min1
5 OUTPUT LEN(minerals)
6 result ← SUBSTRING(2, 5, min2)
7 OUTPUT result
SUBSTRING returns a portion of a string containing the characters from the start index to the end index inclusive (using 0-based indexing). For example, SUBSTRING(1, 3, 'Python') will return the string 'yth'.
State the output of line 7 from this algorithm.
Practise AQA GCSE Computer Science String handling operations in a programming language with exam-style questions for GCSE Computer Science. 90 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.