Assertion(A): An argument is a value that is passed to a method when it is called. Reason(R): Variables which are declared in a method prototype to receive values are called actual parameters
Advertisements
Question
Assertion(A): An argument is a value that is passed to a method when it is called.
Reason(R): Variables which are declared in a method prototype to receive values are called actual parameters.
Options
Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
Assertion (A) is true and Reason (R) is false.
Assertion (A) is false and Reason (R) is true.
MCQ
Advertisements
Solution
Assertion (A) is true and Reason (R) is false
Explanation:
- The assertion is correct because an argument is indeed a value passed to a method when it is called.
- However, the reason is incorrect because the variables declared in a method prototype to receive values are called formal parameters, not actual parameters.
shaalaa.com
Is there an error in this question or solution?
