adplus-dvertising
frame-decoration

Question

What will be the output of the given set of code?
static void Main(string[] args)
 {
     int[] x = {65, 66, 67, 68, 69, 70};
     fun(x);
     Console.ReadLine();
 }
 static void fun(params int[] b )
 {
     int i;
     for (i = 5; i > 0 ; i--)
     {
         b[i] = b[i] + 32;
         Console.WriteLine(Convert.ToChar(b[i]));
     }
 }

a.

A, B, C, D, E, F

b.

F, E, D, C, B, A

c.

f, e, d, c, b

d.

b, c, d, e, f

Posted under C# programming

Answer: (c).f, e, d, c, b

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 given set of code?