13.0k views
2 votes
What is a parameter variable?

a.A variable that is declared in the header of a class.
b.A variable that is declared in the body of a method.
c.A variable that is declared in the header of a method.
d.A variable that is declared in the body of the class.

User Mosh
by
6.1k points

1 Answer

0 votes

Answer:

Option c: A variable that is declared in the header of a method.

is correct answer.

Step-by-step explanation:

  • Parameter variable is also known as Reference variable. They are used while dealing with functions, methods or procedures in order to pass the value(variable) to the method and getting the output value back as return.
  • The parameter variable is written in front of the method's name inside the parenthesis, in the method's header indicated by keyword "var".
  • Parameter variables are infact the assumed names for actual arguments that are given by calling routine.
  • Passing parameter variables to a function is further divided into two parts:
  1. Pass by reference
  2. Pass by value

i hope it will help you!

User Vadim Berman
by
6.0k points