Which of the following will read values from the keyboard in

Which of the following will read values from the keyboard into the array?
(Assume the size of the array is SIZE).

cin >> array;

cin >> array[ ];

for(i = 0;i < SIZE;i ++)
cin >> array[i];

cin >> array[SIZE];

cin >> array;

cin >> array[ ];

for(i = 0;i < SIZE;i ++)
cin >> array[i];

cin >> array[SIZE];

Solution

Answer:

for(i = 0;i < SIZE;i ++)
cin >> array[i];

this statement will read the values from keyboard to array starting location from 0 to SIZE-1.

Which of the following will read values from the keyboard into the array? (Assume the size of the array is SIZE). cin >> array; cin >> array[ ]; for

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site