Computers and Technology
Computers and Technology, 20.12.2019 20:31, httpsjuju

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, genyjoannerubiera
What does a cascading style sheet resolve a conflict over rules for an element? a. the rule affecting the most content wins b. the rule affecting the most content loses c. the rule with the most specific selector loses d. the rule with the most specific selector wins
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, qveenvslayin
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
image
Computers and Technology, 25.06.2019 09:30, cheesecake1919
Evaluate the following code segment. what is the value of count after execution? int count = 1; for(int outer = 0; outer < 4; outer++) for(int inner = 1; inner < 3; inner++) count++; 1 3 9 12 13
Answers: 1
image
Computers and Technology, 25.06.2019 14:00, rniadsharri16
When you see a green traffic arrow signal is turned on, you
Answers: 2
Do you know the correct answer?
Consider the partially-filled array named a. what does the following loop do? (cin is a scanner obj...

Questions in other subjects:

Konu
Social Studies, 08.12.2019 01:31