Ask Question
16 March, 16:46

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]

+1
Answers (1)
  1. 16 March, 18:08
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers