Question 4(b) 2017 · October-November · Paper 21 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
Question 3
Show text version of question
Question 4
Part (b)
Question 4
Numeric formatting converts a numeric value to a string in order to present it in a specific way.
In a generic high-level language, formatting is implemented using a mask system. In this system, each character of the mask corresponds to one character of the formatted string.
Mask characters have the following meaning:
Mask character Meaning # Character must be a digit or a space 0 Character must be a digit
Any other mask characters are taken as literal values and are included in the formatted string.
Part (b)
For each row in the following table, define the mask required to produce the formatted output
from the given value. □ represents a space.
Value Required output Mask
Question 12
Why this question appears here
71% assigned-topic match · Hardware › Logic gates and logic circuits
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 9608_w17_qp_21.pdf
