logo

AQA A-Level Computer Science practice

What is the main purpose of a parameter in a subroutine?

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

What is the main purpose of a parameter in a subroutine?.

  1. A.To pass data into the subroutine
  2. B.To permanently store every value used by the program
  3. C.To stop the subroutine from being called
  4. D.To display the subroutine's results automatically

Answer and explanation

Concise answer

To pass data into the subroutine

Why this is correct

Parameters allow a subroutine to receive data from the part of the program that calls it. This makes the subroutine usable with different data values.

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