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

I forgot what are homophones.Does anyone know what's a homophone.
If the sun ran out of energy what would happen to the energy resources on earth
Why do we use granite?
which number is 100 less than 61 tens?
What's the answer to this problem?
If a > 0 and b < 0, then which of the following must be true. ab > 0 a + b < 0 a - b > 0 a + b > 0 b - a > 0
Explain why the gravitational acceleration of any object near earth is the same matter what was the mass of the object
Give 3 examples to show work being done.
jessicas shoebox is 20 centimeters long and 10 centimeters wide. how many more millimeters is the length of the shoebox than the width
The tickets for the concert are selling for $12.00. Juanita is going to the concert with a group of 25 people. There is a discount of 1/8 off each ticket for gr