ethanspencer8254 ethanspencer8254
  • 18-07-2019
  • Computers and Technology
contestada

int alpha [5];

int j;
alpha [0] = 2
for ( j = 1; j < 5; j++)
alpha [j] = alpha [ j - 1] + 3;
3. What is the value ofalpha[4] after the code aboveexecutes?

a.

5

c.

11

b.

8

d.

14

Respuesta :

demimurray573
demimurray573 demimurray573
  • 28-07-2019

Answer:

D - 14

Explanation:

Each time the program executes an iteration of the for-loop, it works out the current element by adding 3 to the previous element.

alpha[0] = 2

+3

alpha[1] = 5

+3

alpha[2] = 8

+3

alpha[3] = 11

+3

alpha[4] = 14

Answer Link

Otras preguntas

how does friction help soccer players
When the first periodic table of the elements was published, the elements were arranged by atomic mass. Although several elements seemed out of order, later dis
What is the 99th term counting by 2s
The Sedition Act made it illegal to a. buy Liberty bonds. b. work in factories. c. discuss anything negative about the government, the Constitution, the army,
Write 11 out of 25 as a percentage
Similarities and differences between a milanesa and a milanesa napolitana
4x = 12x + 32 ? plz help me
the ocean and the atmosphere serve as long term storgae areas for carbon and other nutrients what are these storage areas called
How to divide the number 2 divided by 806
98 prime or composite