adplus-dvertising
frame-decoration

Question

What will be the output of the C#.NET code snippet given below?

namespace CompSciBitsConsoleApplication
{ 
    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 ] + " "); 
            } 
        } 
    } 
}

a.

1 2 3 4 5

b.

6 7 8 9 10

c.

5 10 15 20 25

d.

5 25 125 625 3125

Answer: (c).5 10 15 20 25

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the C#.NET code snippet given below?

Similar Questions

Discover Related MCQs