Delegates on C# related Questions and Answers


Question :   Which among the following is the wrong way to define and initialize an array of 4 integers?
1. int[] a = {25, 30, 40, 5}
2. int[] a; a = new int[3] a[0] = 25 a[1] = 30 a[2] = 40 a[3] = 5
3. int[] a a = new int[4]{25, 30, 40, 5}
4. int[] a a = new int[4] a[0] = 25 a[1] = 30 a[2] = 40 a[3] = 5
Answer :   2 - int[] a; a = new int[3] a[0] = 25 a[1] = 30 a[2] = 40 a[3] = 5  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter