Question: C# Perform the following tasks: a) declare constant MAX_SIZE array initialize to 100 b) declare variable my Array which will reference an array with MAX+SIZE
Perform the following tasks: a) declare constant MAX_SIZE array initialize to 100 b) declare variable my Array which will reference an array with MAX+SIZE elements of type double (initialize all elements to 0). c) assign the value of 2.5 to array with index 4 d) assign the value of 4.50 to array elements with index 6 e) display both array elements f) sum all elements using an iterative structure (for or while loop) Identify, it there is a syntax error each code segment. Briefly explain why? a) ________________ private const int MAX_SIZE = 10: MAX_SIZE = 100: b) ___________________ private int [] array = new int [5]: array[0] = 2.5: array[1] = 1: array[2] = 2.99: array[3] = 2.3: array[4] = 3: c) _________________ private int[] array = new int [5] for(int i = 0: i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
