(Choose 1 answer)
What is the output of the following code?
static void Find(int[] a, ref int x)
{
x = a[0];
foreach (int item in a){
if(item > x)
{
x=item;
}
}
static void Main(string[] args){
int[]a = {2, 1, 8, 3, 7};int x = 0;
Find(a, ref x);
Console.WriteLine(x);
}
A. 8
B. 1
C. 2
D. 7
Exit 49