input values into array

I think it is b, because it does not have brackets. Or maybe c because all that does is display the array, not inputting values. Any thoughts?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  Which of the following cannot be used to input values into a 3-element int array named alpha?
		

cin  >>  alpha [ 0 ]  >>  alpha [ 1 ]  >> alpha  [ 2 ];
		

cin  >>  alpha;
		

for (i = 0; i < 3; i++)
     cin  >>  alpha [ i ];
		

cin  >> alpha [ 0 ];
cin  >> alpha [ 1 ];
cin  >> alpha [ 2 ];
Why do you think (c) displays the array?
Look here http://www.cplusplus.com/reference/istream/istream/operator%3E%3E/
you will see which data types can be used with >>

there isn't an array in the list, so that's the one.
oh nvm, i thought the cin was a cout in the for loop. so its b. thanks.
Topic archived. No new replies allowed.