logo

AQA A-Level Computer Science practice

A subroutine is defined as `displayResult(score, name)`. Which call follows this interface?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming

Exam-style question

Try this first

A subroutine is defined as `displayResult(score, name)`. Which call follows this interface?.

  1. A.displayResult()
  2. B.displayResult(82)
  3. C.displayResult(82, "Ari")
  4. D.displayResult(82, "Ari", true)

Answer and explanation

Concise answer

displayResult(82, "Ari")

Why this is correct

The interface requires two arguments: one for score and one for name. The selected call supplies exactly two values in the required order.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions