1Easy
0/1

In a certain programming language, string handling functions are defined as follows:

  • substring(start, length, string) returns a substring of length length starting at the 0-based index start.
  • len(string) returns the total number of characters in the string (including spaces).
  • + is the string concatenation operator.

Consider the following code segment:

title ← "Web Development"
tag ← "Code"
id ← substring(4, 11, title) + "_" + tag

What is the value returned by len(id)?

121212

131313

151515

161616

String handling operations in a programming language Questions

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.

Next

String handling operations in a programming language Questions

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