Home / C# Programming / Arrays - C# :: Discussion

Discussion :: Arrays - C#

  1. If a is an array of 5 integers then which of the following is the correct way to increase its size to 10 elements?

  2. A.
      int[] a = new int[5];
      int[] a = new int[10];
    B.
      int[] a = int[5];
      int[] a = int[10];
    C.
     int[] a = new int[5]; 
     a.Length = 10 ;
    D.
     int[] a = new int[5]; 
     a = new int[10];
    E.
     int[] a = new int[5]; 
     a.GetUpperBound(10);

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment