A student is writing an automated system logging utility and defines three string variables:
service ← "Database"
status ← "Offline"
id ← "743"
The system generates a tracking code using the following expression:
result ← service.substring(0, 4) + status.substring(2, 3) + id.substring(1, 2)
What is the value of the variable result after this expression is evaluated?
(Assume that string.substring(startIndex, length) uses 0-based indexing and returns a substring of the specified length.)
"Datafli43"
"Dataffl74"
"Dataf4"
"Databfl43"
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.