Which Method Does Following C Code Explainsp Pre Langcsharp #290
Which method does following C# code explains?</p> <pre><code class="language-csharp" line="1"> static void Main(string[] args) { int a = 10, b = 20; method(ref a, ref b); console.writeline(a + " " + b); } static void swap(ref int i, ref int j) { int t; t = i; i = j; j = t; } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Arrays and Strings - Use of Ref and Out Parameters - Quiz No.1.
Which method does following C# code explains?
static void Main(string[] args) { int a = 10, b = 20; method(ref a, ref b); console.writeline(a + " " + b); } static void swap(ref int i, ref int j) { int t; t = i; i = j; j = t; }
Call by reference
Call by value
Output parameter
parameter arrays