3/8/23, 11:34 AMMidterm Quiz 2: Attempt review trimestral.amaesonline.com/2223A/mod/quiz/review.php?attempt=195562&cmid=114541/4Started onWednesday, 8 March 2023, 11:31 AM StateFinished Completed onWednesday, 8 March 2023, 11:32 AM Time taken1 min 51 secs Marks10.00/10.00 Grade100.00out of 100.00 Question 1 Correct Mark 1.00 out of 1.00 Question 2 Correct Mark 1.00 out of 1.00 Which of the following declares an array of int named intArray? Select one: a.All of these b.int intArray[][]; c.int[][] intArray; d.int intArray[]; e.int[] intArray; What is the output of the code snippet below: int[] intArray = new int[10]; for(int x = 0; x<intArray.length; x++){System.out.print(intArray[x]);} Select one: a.The given code is not valid b.1235678910 c.0000000000 d.012356789 e.None of the choices
Your answer is correct.
3/8/23, 11:34 AMMidterm Quiz 2: Attempt review trimestral.amaesonline.com/2223A/mod/quiz/review.php?attempt=195562&cmid=114542/4Question 3 Correct Mark 1.00 out of 1.00 Question 4 Correct Mark 1.00 out of 1.00 Question 5 Correct Mark 1.00 out of 1.00 What is the length of the array: int[] intArray = { 1, 2, 3, 5, 6, 7 }; Select one: a.4 b.5 c.7 d.None of the choices e.6 Your answer is correct. Which of the following correctly accesses the sixth element stored in an array of 10 elements? Select one: a.None of these b.intArray[7]; c.intArray[6]; d.intArray[10]; e.stringArray[5]; What is the maximum index of the array: int[] intArray = { 1, 2, 3, 5, 6, 7 }; Select one: a.6 b.None of the choices c.7 d.4 e.5 Your answer is correct.
End of preview
Want to read all 4 pages? Upload your study docs or become a member.