Question 1(b) 2015 · May-June · Paper 21 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 1
Part (b)
Part (b)
Letter15 CHAR(ASCII('A') + 14)
Show text version of question
Question 1
Part (b)
Question 1
A high-level programming language has the built-in string handling function MID defined as follows:
MID(ThisString : STRING, x : INTEGER, n : INTEGER) RETURNS STRING
returns a substring of n characters from the string ThisString starting at position x.
For example: MID("STOP", 3, 2) returns "OP"
If the function call is not properly formed, an error is generated.
Part (b)
A date is stored in the format DDMMYYYY in the string variable TodaysDate.
Use the function MID to separate the day, month and year.
ThisDay ← ..............................................................................................................................
ThisMonth ← ..........................................................................................................................
ThisYear ← .......................................................................................................................
Why this question appears here
82% assigned-topic match · Data types and structures › Data types and records
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s15_qp_21.pdf
