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

Frances read 4/5 of an artlcle In three minutes. How much of the article did she read each minute?
Please answer the question. A, B, C, or D?
Susan is buying juice for a party. She wants to buy as many bottles of juice as possible, but she only has $10.00 to spend. If each bottle of juice costs $1.35,
What might occur if humans reproduced through the process of mitosis?
How do I solve this equation?
Why people in life or death shouldn't be held accountable for their actions
The area of a rectangle is 24 square centimeters and its side lengths are x centimeters and x+ 2 centimeters, a. Find the side lengths of the rectangle. Justify
3) HELP ASAP due in 10 min plz
I need help please and thank you .
Define the word Democracy in your own words(writing)? How would America be altered if we did not have a democratic government(speaking?