Which Among The Following Is The Wrong Way To Define And #670
Which among the following is the wrong way to define and initialize an array of 4 integers?
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Delegates, Generics and LINQ - Introduction of Array Class - Quiz No.1.
Which among the following is the wrong way to define and initialize an array of 4 integers?
int[] a = {25, 30, 40, 5}
int[] a; a = new int[3] a[0] = 25 a[1] = 30 a[2] = 40 a[3] = 5
int[] a a = new int[4]{25, 30, 40, 5}
int[] a a = new int[4] a[0] = 25 a[1] = 30 a[2] = 40 a[3] = 5