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

2 tens 3 tenths 1 thousandths greater or less than 20.31
Absolute value inequality.                                                               |2w-5|  ((is less than or equal to))  5
how to solve 3/4 = 8/x-1
What is 14 hours after 3 : 00 a.m?
what is the relationship between the values of the 4s in 4,438
What is the steepest line possible? What is the slope?
A farmer builds a fence to enclose a rectangular pasture.He uses 160 feet of fence. Find the total area if the pasture is 50 feet long
which value correctly represents the number that is 10 times as great as five hundred eighty-one thousandths?
What is the estimate for 200,629+28,542
Which of the following organisms lacks a coelom? (A) roundworms (B) segmented worms (C) clams (D) grasshoppers (E) people