String handling operations in a programming language

EasyMedium
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
Question 67
Easy

Shade one lozenge which shows the output of line 7 from the algorithm shown in Figure 1.

Figure 1

1  prefixes ← ['SYS', 'USR', 'ADM']
2  id1 ← 'USR-8042-X'
3  id2 ← 'SYS-1105-Y'
4  OUTPUT id1
5  OUTPUT LEN(prefixes)
6  segment ← SUBSTRING(4, 4, id1)
7  OUTPUT segment

’-804’\text{'-804'}’-804’

’8042’\text{'8042'}’8042’

’8’\text{'8'}’8’

’8042-’\text{'8042-'}’8042-’

String handling operations in a programming language Questions

  1. GCSE
  2. /Computer Science
  3. /String handling operations in a programming language