Computers and Technology, 31.12.2019 00:31, tcarston1728
Consider the partially-filled array named a. what does the following loop do? (cin is a scanner object)
int[] a = {1, 3, 7, 0, 0, 0};
int size = 3, capacity = 6;
int value = cin. nextint();
while (size < capacity & & value > 0)
{
a[size] = value;
size++;
1. reads one value and places it in the remaining three unused spaces in a.
2. reads up to 3 values and places them in the array in the unused space.
3. reads up to 3 values and inserts them in the array in the correct position.
4. crashes at runtime because it tries to write beyond the array.
Answers: 1
Computers and Technology, 22.06.2019 19:00, dadonelson2109
If your accelerator suddenly gets stuck what should you do
Answers: 2
Computers and Technology, 23.06.2019 03:00, SKYBLUE1015
What are the different parts of computer
Answers: 2
Consider the partially-filled array named a. what does the following loop do? (cin is a scanner obj...
Chemistry, 01.08.2019 18:30
Biology, 01.08.2019 18:30
Biology, 01.08.2019 18:30
Social Studies, 01.08.2019 18:30