AlyssaHuling5506 AlyssaHuling5506
  • 04-07-2019
  • Computers and Technology
contestada

What will the following code print out: int numbers [] = {99, 87, . 66, 55, 101}; for (int i = 1; i < 4; i++) cout << numbers [i] << end1;a) 99 87 66 55 101 b) 87 66 55 101 c) 87 66 55 d) Nothing.

Respuesta :

PhantomWisdom PhantomWisdom
  • 14-07-2019

Answer:

87 66 55

Explanation:

Array is used o store the multiple values with same data type.

the array show a decimal value .66, i assume this is enter by mistake because option has no decimal value.

The index of the array is start from zero, it means the first element store in the array at position zero.

In the for loop the variable 'i' start from 1 not zero and it goes to i<4 means i=3.

So, it access the element from 2 to 4 because the index is position of element less than 1.

Therefore, 87 66 55 print.

Answer Link

Otras preguntas

Write a paragraph explaining how domesticating livestock allowed civilizations to spread.
How did the growth of the rail networks impact the meatpacking industry?
put the following decimals from least to greatest:0.258,0.4,0.52,1.25,0.04
jamie wrote 4.4 - 0.33 = 1.1 . Is his answer resonable? Why or why not?
Which of the following is not true about the evolution of biomes?
numbers like 10;100;1,000 and so on are called
Katie said "Negative numbers are intergers". What was her error
Did Columbus reflect the values of the late 15th century Europe?
if you were asked to express the weight in ounces of a ladybug in scientific notation, would the exponent of the 10 be positive or negative
Which statement best describes the relationship between Byron and the two romantic poets Samuel Taylor Coleridge and William Wordsworth? A. They were close frie