Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2023 · Paper 21 · Question 4

9618

As printed in the paper

The question as text

Function Replace() will: 1. take three parameters: • a string (the original string) • a char (the original character) • a char (the new character) 2. form a new string from the original string where all instances of the original character are replaced by the new character 3. return the new string. Write pseudocode for function Replace(). [6]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.