Ask Question
12 September, 06:38

var testScores = []; testScores[0] = [80, 82, 90, 87, 85]; testScores[1] = [79, 80, 74, 82, 81]; testScores[2] = [93, 95, 89, 100, 85]; testScores[3] = [60, 72, 65, 71, 79]; (Refer to code example 16-1) Which of the following returns a value of 89? a. testScores[3][1]b. testScores[0][4]c. testScores[2][2]d. testScores[1][3]

+5
Answers (1)
  1. 12 September, 10:20
    0
    C) testScores[2][2]

    Explanation:

    Consider that the above has been translated into a java program. A two dimentional array is declared to hold the value of the testScores.

    The complete program and the output is given below

    public class twoDimenTestScores {

    public static void main (String[] args) {

    int[][] testScores = {

    {80, 82, 90, 87, 85},

    {79, 80, 74, 82, 81},

    {93, 95, 89, 100, 85},

    {60, 72, 65, 71, 79}

    };

    System. out. println (testScores[3][1]); / / prints 72

    System. out. println (testScores[0][4]); / / prints 85

    System. out. println (testScores[2][2]); / / prints 89

    System. out. println (testScores[1][3]); / / prints 82

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “var testScores = []; testScores[0] = [80, 82, 90, 87, 85]; testScores[1] = [79, 80, 74, 82, 81]; testScores[2] = [93, 95, 89, 100, 85]; ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers