Functions and Subroutines

Q1:
What will be the output of the C#.NET code snippet given below?
namespace AptitudeCrackConsoleApplication
{ 
    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

E 6 12 18 24 30

ANS:C - 5 10 15 20 25

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.