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;
}
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;
}
A. ref int a, int b, ref float c
B. ref int a, ref float c, ref int b
C. ref int a, ref int b, float c
D. ref int a, ref int b, ref float c
Answer: Option D
Join The Discussion