Ask Question
21 August, 23:57

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. 22 August, 02:57
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers