subject

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 (value > 0){a[size] = value; size++; value = cin. nextint(); }1. may crashe at runtime because it can input more elements than the array can hold2. reads up to 3 values and inserts them in the array in the correct position.3. reads one value and places it in the remaining first unused space endlessly.4. reads up to 3 values and places them in the array in the unused space.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
You know the right answer?
Consider the partially-filled array named a. what does the following loop do? (cin is a scanner obj...
Questions
question
Mathematics, 27.09.2020 01:01
question
Mathematics, 27.09.2020 01:01
question
Mathematics, 27.09.2020 01:01
question
History, 27.09.2020 01:01
question
Mathematics, 27.09.2020 01:01
question
Mathematics, 27.09.2020 01:01
question
History, 27.09.2020 01:01
Questions on the website: 13722363