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

Find the value of the missing Use SOH CAH TOA
MÓNICA ¿Viajaste durante tus vacaciones? DAVID Sí, fui a Panamá. Estuve allí hace dos años, pero siempre (1) blank (querer) regresar. (2) blank (ser) un viaje m
How did the Mongolian Empire come to an end? It was conquered by an army of Muslims from Baghdad. A Russian czar invaded China. It collapsed from internal fight
Name the macromolecule that fills the cytoplasm (pointer tip) of cells of this connective tissue.
The domain for g(x)=5x-1 is -2
Again, image attached also URGENT!!
Please help ASAP!!!!
What causes mutations? A.It's how your born B.Mistakes in replication or environmental substances C.Passed down by genetics D.The amino acids
Which factor has been a major cause of mass migrations during the modern era?
Which factors afect gravitational force?