Suppose you have an array “n” that has already been filled with elements (and th
ID: 3661998 • Letter: S
Question
Suppose you have an array “n” that has already been filled with elements (and the variable countcorrectly holds the number of elements). Which of the following loops will NOTcorrectly print out each element in the array?
a: for ( int i = 1 i <= count i++ ) { cout << n[i1] << endl }
b: for ( int i = 0 i < count i++ ) { cout << n[i] << endl }
c: for ( int i = 0 i <= count i++) { cout << n[i] << endl }
d: for ( int i = 0 i <= count1 i++) { cout << n[i] << endl }
Explanation / Answer
a,c,d will not print the array correctly