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.
Option c: A variable that is declared in the header of a method.
is correct answer.
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: