Select The Correct Match Of Parameter Declarationp Pre #295
Select the correct match of parameter declaration.</p> <pre><code class="language-csharp" line="1"> static Void main(string[] args) { int a = 5; int b = 6; float c = 7.2f; math (ref a, ref b, ref c); Console.WriteLine(a + " " + b + " " + c); } static int math(/*add parameter declaration */) { a += b; b *= (int)c; c += a * b; return 0; } </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.
Select the correct match of parameter declaration.
static Void main(string[] args) { int a = 5; int b = 6; float c = 7.2f; math (ref a, ref b, ref c); Console.WriteLine(a + " " + b + " " + c); } static int math(/*add parameter declaration */) { a += b; b *= (int)c; c += a * b; return 0; }
ref int a, int b, ref float c
ref int a, ref float c, ref int b
ref int a, ref int b, float c
ref int a, ref int b, ref float c