221k views
3 votes
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]

1 Answer

3 votes

Answer:

c

Step-by-step explanation:

i took test

User Petre Sosa
by
4.0k points