logo

Question detail

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

Try the question, check the answer, then read the explanation to understand the curriculum point.

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

Model answer

What a good answer should say

  • A parameter provides a way for data to be passed to a subroutine when it is called.

Explanation

Why this works

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.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.