Ask Question

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

+3
Answers (1)
  1. 27 May, 18:13
    0
    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
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “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 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers