Question 6(b) 2016 · May-June · Paper 23 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
Part (b)
Question 6
Question 23
Question 23
Question 23
Show text version of question
Question 6
Part (b)
Part (b)
Write the pseudocode equivalent of the structured English. Use the identifiers from the table
in part (a). For the built-in functions list, refer to the Appendix on the last page. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[6]
Question 6
Question 3
String encryption was implemented using a simple character-substitution method. A function, Decrypt, is needed to reverse the encryption process and return the original character. The encryption uses the 7-bit ASCII value for each character. This value is used as an index for a 1D array, Lookup, which contains the substitute characters. Lookup contains an entry for each of the ASCII characters. This function, Decrypt, will accept two parameters, a single character, CipherChar, and the 1D array, Lookup. The steps involved in Decrypt are follows: • Search for the character in the array • Note the index value where the character is found (the index value is the ASCII value of the original character) • Use the index value to obtain the original character
Why this question appears here
71% assigned-topic match · Data types and structures › Arrays
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_s16_qp_23.pdf
