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

Grana,thylakoids,and storms are all components found in
The forces acting on a falling leaf are. a. Air resistance and fluid friction. b. Gravity and air resistance. c. Gravity and static friction. d. Weight and
y=3x - 11 Y= -3x - 2
If you buy 3 sandwiches for 4.95 or 4 sandwiches for 6.72 which is the better buy
Someone help me analyse the ballad The Trap by Jon Stallworthy.. PLEASE HELP! DESPERATE......
A school with 20 standalone PCs is considering networking them together and adding a file server. Write four benefits of doing this.
Which of the following choices is a fragment (an incomplete sentence)? Ever since my sister hacked my facebook account. I ve been very cautious. I never leave m
Is y=-13/6x+5/3 same as 13x+6y=10 ?
Bulimia is a healthy way to control your weight. True or False
Divide 969 by 26. A. 32 r 6 b. 29 r 17 C. 37 r 7 D. 28 r 5