Question: EX 8.1 Which of the following are valid declarations? Which instantiate an array object? Explain your answers. int primes = (2, 3, 4, 5,

EX 8.1 Which of the following are valid declarations? Which instantiate an array object? Explain your answers. int primes = (2, 3, 4, 5, 7, 11); float elapsedTimes[] = {11.47, 12.04, 11.72, 13.88); int[] scores = int [30]; int[] primes = new (2,3,5,7,11); int[] scores = new int[30]; char grades[] = {'a', 'b', 'c', 'd', ''}; char[] grades = new char[];
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
