Consider the following declaration: int beta[3]; int j; Which of the following input statements correctly inputs values into beta? (i) cin>>beta[0] >>beta[1] >>beta[2]; (ii) for(j = 0; j < 3; j++) cin>>beta[j];
Given the declaration int gamma[50]; int j; Which of the following for loop sets the index of gamma out of bound? (i) for(j = 0; j <= 49; j++) cout<(ii) for(j = 1; j < 50; j++) cout<(iii) for(j = 0; j <= 50; j++) cout<
What is the value of alpha[4] after the following code executes? int alpha[5]; int j; alpha[0] = 2; for(j = 1; j < 5; j++) alpha[j] = alpha[j – 1] + 3;