Home » C# Programming » Functions and Subroutines

What will be the output of the C#.NET code snippet given below? namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[] args) { int[]arr = newint[]{ 1, 2, 3, 4, 5 }; fun(ref arr); } static void fun(ref int[] a) { for (int i = 0; i < a.Length; i++) { a[i] = a[i] * 5; Console.Write(a[ i ] + " "); } } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!