1.

Select the output for the following set of code : static void Main(string[] args) { int[] arr = new int[] {1 ,2 ,3 ,4 ,5 }; fun1(ref arr); Console.ReadLine(); } static void fun1(ref int[] array) { for (int i = 0; i < array.Length; i++) { array[i] = array[i] + 5; Console.WriteLine(array[i] + " "); } }

A. 6 7 8 9 10
B. 15 17 8 8 20
C. 15 17 8 29 20
D. Syntax error while passing reference of array variable.
Answer» B. 15 17 8 8 20


Discussion

No Comment Found