Suppose that list is an array of 10 components of type int.Which of the following codes correctly outputs all the elements of list?
A) for (int j = 1; j < 10; j++)
Cout << list[j] << " ";
Cout << endl;
B) for (int j = 0; j <= 9; j++)
Cout << list[j] << " ";
Cout << endl;
C) for (int j = 1; j < 11; j++)
Cout << list[j] << " ";
Cout << endl;
D) for (int j = 1; j <= 10; j++)
Cout << list[j] << " ";
Cout << endl;
Correct Answer:
Verified
Q14: What is the value of alpha[2] after
Q15: Arrays can be passed as parameters to
Q16: What is the output of the following
Q17: Which of the following statements declares alpha
Q18: Suppose that sales is an array of
Q20: The array index can be any integer
Q21: Consider the following statement: int alpha[25][10];.Which of
Q22: Which of the following correctly declares name
Q23: Consider the following declaration: int alpha[5] =
Q24: Consider the following declaration:char charArray[51]; char discard;
Assume
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