The following is a function:
FUNCTION findmax(score)
length <-- len(score)
maxvalue <-- score[0]
FOR n <-- 1 TO length - 1
IF score[n] > maxvalue
maxvalue <-- score[n]
ENDIF
ENDFOR
RETURN maxvalue
ENDFUNCTION
(a) Write a statement to use this function to find the maximum value in an array NumberOfViewers [1]
(b) Give the name of a parameter used by this function. [1]
(c) Identify a local variable [1]
(d) State the data type of score. [1]
(e) Give an example from this function of
(i) an assignment statement [1]
(ii) iteration [1]
(iii) selection [1]