HeckinBrandon
HeckinBrandon HeckinBrandon
  • 01-12-2020
  • Computers and Technology
contestada

What is the index of 7 in this list?
that list being [5, 6, 10, 7, 3, 2.5]

7
4
2
3

Any brainliest beggars will be flagged

Respuesta :

jffrydsr
jffrydsr jffrydsr
  • 01-12-2020

Answer:

-1 (out of range).

Explanation:

Index '7' cannot exist in 0-indexed array of size '6'.

If return type is 'Integer' out-of-range exception should be thrown.

[ 0, 1,  2, 3, 4,  5] :: indices. (length = 6)

[ 5, 6, 10, 7, 3, 2.5 ] :: elements.

Answer Link

Otras preguntas

Sex is NOT a way to __________. a. prove your love b. increase your self-worth c. bargain for attention d. all of the above
Why do the two hemispheres of the brain control the opposite sides of the body?
The substance which is dissolved in a solution is called: solvent colloids solute precipitant
The LARGEST sector of Israel's economy involves A) gold mining. Eliminate B) coffee harvesting. C) high-tech industries. D) petroleum production.
Most profits from the global economy that emerged in the early 1900s went to a. industrialized nations of the West. b. local economies in Africa and Asia. c. Eu
During which of the working phases do historians ask a big question? A. research B. inquiry C. writing D. library
Study the analogy, and then answer the question that follows. medium : average :: regular : normal What kind of analogy is this? A. synonyms B. part to whole C.
when do solar eclipses occur?
Is it correct to use “punctuation outside of the quotations”, or “inside?”
What pamphlet convinced many that the American colonies needed to make a formal break with Great Britain? a. Common Sense b. The Social Contract c. The Wealt