State the output of line 7 from the algorithm shown in Figure 1.
(Note: Assume string indexing begins at 0 and the substring function takes parameters in the format SUBSTRING(start_index, length, string)).
1 towns ← ['Belfast', 'Cardiff']
2 town1 ← 'Manchester'
3 town2 ← 'Bristol'
4 OUTPUT town1
5 OUTPUT LEN(towns)
6 part ← SUBSTRING(3, 4, town1)
7 OUTPUT part
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.