What is the output of the following C++ code? int alpha[5] = {2,4,6,8,10};
int j;
for (j = 4; j >= 0; j--)
cout << alpha[j] << " ";
cout << endl;
A) 2 4 6 8 10
B) 4 3 2 1 0
C) 8 6 4 2 0
D) 10 8 6 4 2
Correct Answer:
Verified
Q2: The one place where C++ allows aggregate
Q4: When you pass an array as a
Q6: Assume you have the following declaration char
Q8: What is the value of alpha[2]
Q9: The statement int list[25]; declares list to
Q10: Assume you have the following declaration int
Q11: All components of an array are of
Q12: In a two-dimensional array, the elements are
Q13: Given the declaration int list[20]; the statement
Q17: Which of the following statements declares alpha
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents