Vidyalelo
C# Programming · Q65

Arrays and Strings in C Sharp

Programming · C# Programming · question 65

Q65

What will be the output of the following C# code? static void Main(string[] args) int [] a = 1, 2, 3, 4, 5; fun(a); Console.ReadLine(); static void fun(params int[] b ) for (int i = 0; i < b.Length; i++) b[i] = b[i] * 5 ; Console.WriteLine(b[i] + "");

A.
1, 2, 3, 4, 5
B.
5, 10, 15, 20, 25
Answer
C.
5, 25, 125, 625, 3125
D.
6, 12, 18, 24, 30

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board