Ask Question
11 May, 23:00

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

+2
Answers (1)
  1. 11 May, 23:49
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers