Ask Question
13 May, 16:37

Fill in each blank with the correct answer/output.

int[] vals = {7,5,3,9,0,37,93,16,68,6,99};

System. out. println (vals[vals[1]+vals[4]]);

+1
Answers (1)
  1. 13 May, 18:33
    0
    37

    Explanation:

    Given int[] vals = {7,5,3,9,0,37,93,16,68,6,99};

    In programming, the position of each value in the list are known as index. The first value is always assigned index of 0 not 1, the second value is assigned index of 1 and so on. For example;

    val[0] = 7 i. e value with index 0

    val[1] = 5

    val[4] = 0

    In order to print out this value

    System. out. println (vals[vals[1]+vals[4]]);

    Substituting the index value val[1] and val[4] into the argument given

    vals[vals[1]+vals[4]]

    = vals[5+0]

    = vals[5]

    = 37 (value at the 5th index)

    System. out. println (vals[vals[1]+vals[4]]);

    = 37

    This means that the system will print out 37 to the console
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Fill in each blank with the correct answer/output. int[] vals = {7,5,3,9,0,37,93,16,68,6,99}; System. out. println (vals[vals[1]+vals[4]]); ...” 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