What is the value of alpha[3] after the following code executes? int alpha[5]; int j; alpha[0] = 5; for(j = 1; j < 5; j++) { if(j % 2 == 0) alpha[j] = alpha[j – 1] + 2; else alpha[j] = alpha[j – 1] + 3; }
What is stored in alpha after the following code executes? int alpha[5]; int j; for(j = 0; j < 5; j++) { alpha[j] = j + 5; if(j % 2 == 1) alpha[j - 1] = alpha[j] + 2; }
What is stored in alpha after the following code executes? int alpha[5]; int j; for(j = 0; j < 5; j++) { alpha[j] = 2 * j; if(j % 2 == 1) alpha[j - 1] = alpha[j] + j; }
What is stored in alpha after the following code executes? int alpha[5]; int j; for(j = 0; j < 5; j++) { alpha[j] = j + 1; if(j > 2) alpha[j - 1] = alpha[j] + 2; }
What is the value of alpha[3] after the following code executes? int alpha[5]; int j; for(j = 4; j >= ; j--) { alpha[j] = j + 5; if(j <= 2) alpha[j + 1] = alpha[j] + 3; }