ExamVeda
Login
Home
LINQ (Language Integrated Query) in C Sharp
?

What will be the output of the following C# code snippet?
static void Main(string[] args)
{
    string[] strings = {"beta", "alpha", "gamma"};
    Console.WriteLine("Array elements: ");
    DisplayArray(strings);
    Array.Reverse(strings); 
    Console.WriteLine("Array elements now: ");
    DisplayArray(strings);
    Console.ReadLine();
 }
 public static void DisplayArray(Array array)
 {
     foreach (object o in array)
     {
         Console.Write("{0} ", o);
     }
         Console.WriteLine();
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.