Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. What will be the output the of given set of 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] + "");
         }
     }
  2. A.
    1, 2, 3, 4, 5
    B.
    5, 10, 15, 20, 25
    C.
    5, 25, 125, 625, 3125
    D.
    6, 12, 18, 24, 30

    View Answer

    Workspace

    Answer : Option B

    Explanation :



Be The First To Comment