+ 1

Can any one tell explanation for below program answer

using System; class program { 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=i+2) { array[i] = array[i] + 10; } Console.WriteLine(string.Join(",", array)); } } Ans: 11,2,13,4,15

1st May 2019, 3:47 PM
$@G@®️
$@G@®️ - avatar
1 ответ