Multiple choice

Which of the following enable(s) you to change multiple values in a method?

  1. Reference Parameters

  2. Output Parameters

  3. Aliases

  4. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In languages like C#, both reference parameters (using ref) and output parameters (using out) allow a method to modify and return multiple values back to the calling code. Therefore, both options enable changing multiple values.