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

my 5th number is 32 and my 4th number is 27 what is my 1st number?
PLEASE HELP Explain the message of the cartoon.
Gretchen used the following thesis statement in the introduction to an essay about the topic of a character’s journey in a literary work: In Jane Eyre, the titl
Question 3 (1 point) A teacher gives her students diffraction gratings. When the students look through the diffraction gratings up at the lights, the white ligh
Standard to Graphing Form: y= -4x^2+48x-149 into graphing form. Please give step by step
convert 5 centimeters into yards rounded to nearest hundredth
3. Apakah ciri-ciri imbangan pada kraf wau?
Write the equation of the line in slope-intercept form (y = mx + b) based on the given information. 11. Passes through (12,-6) and perpendicular to y = 3x + 1​
Find the difference between the two. Thanks! 4a –3b +2c and –6a +4b –2c –2
SY FOR f(x)= x³ - 8x² + kx-20 When f(x) is divided by (x - 1), the remainder is R. When f(x) is divided by (x - 2), the remainder is 4R. Find the value of k.