Past-paper question · 2014 October-November · Paper 32 · Q7(f)

Question 7(f) 2014 · October-November · Paper 32 · 2 marks

Original past-paper question for 7(F)
Original past-paper question for 7(F)
Original past-paper question for 7(F)
Original past-paper question for 7(F)
Reveal official mark-scheme answer Official mark-scheme answer for 7(F)

Official answer for Question 7

Part (f)

Part (f)

✓
Built-in functions are those provided (as a part of the programming
✓
language) // accept by example

Question 1

✓
User defined functions are designed and coded by the
✓
programmer

Question 1

[2]

Mark scheme 9691_w14_ms_32.pdf →

Show text version of question

Question 7

Part (f)

Question 7

The function Replace is documented as follows:

FUNCTION Replace(ThisString : STRING, FindString : STRING, ReplaceString : STRING, [MatchType : CHAR]) RETURNS STRING

Square brackets used in the function header indicate the parameter is optional.

The function searches for FindString within ThisString. When a match is found, all occurrences of FindString within ThisString are replaced with ReplaceString.

MatchType indicates the type of match looked for:

  • 'E': indicates the strings must match exactly
  • 'C': indicates a match is reported irrespective of the case of either string

The function returns ThisString.

Any function call which is not properly formed returns an error.

What is returned by the following function calls?

Part (f)

High-level programming languages have two types of function. These are built-in and

user-defined.

Explain the difference between them. You may give an example from your practical experience for a built-in function.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

Question 19

Question 20

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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_w14_qp_32.pdf

Keep practising this topic