Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CST 8116 QUIZ 10 QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

Beoordeling
-
Verkocht
-
Pagina's
3
Cijfer
A+
Geüpload op
16-05-2026
Geschreven in
2025/2026

CST 8116 QUIZ 10 QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026 The true benefit of using an array lies in your ability to use a ____ as a subscript to the array. constant loop command variable - Answers variable When you search through a list from one end to the other, you are performing a ____. linear search binary search quadratic search single lookup - Answers linear search Which statement is true of arrays? A. Only whole numbers can be used as array subscripts. B. Only whole numbers can be stored in arrays. C. Arrays cause more work for the programmer, but allow faster program execution. D. Array elements cannot be reset after the array is declared. - Answers A Every array has a(n) ____ size. infinite finite variable equal - Answers finite The number of bytes in an array is always a multiple of the number of ____ in an array. subscripts elements iterators indexes - Answers elements In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses memory occupied by the array. superscript subscript key condition - Answers subscript Parallel arrays are most useful when value pairs have a(n) ____ relationship. direct indirect linked tiered - Answers indirect A ____ relates parallel arrays. superscript key subscript postscript - Answers subscript If you declare an array in Java to store boolean values, you can set each element to ____. any number true or false any integer 1 or -1 - Answers true or false When an array myArray is only partially filled, how can the programmer keep track of the current number of elements? A. access myAh() B. maintain a companion variable that stores the current number of elements C. access myAntElements() D. access myAh() - 1 - Answers B If currLength is an integer variable that gives the number of elements currently in the array myArray, which code snippet prints out the elements in the partially filled array of integers? A. for (int i = 0; i myAh(); i++) {S(myArray[i]);} B. for (int i = 0; i myALength(); i++){S(myArray[i]);} C. for (int i = 0; i currLength; i++) {S(myArray[i]);} D. for (int i = 0; i myAh(); i++){S(myArray[currLength]);} - Answers C In a partially filled array, the number of slots in the array that are not currently used is the A. length of the array minus the number of elements currently in the array. B. number of elements currently in the array minus the length of the array. C. length of the array plus the number of elements currently in the array. D. number of elements currently in the array. - Answers A When a Java program terminates and reports an exception, the error message contains which pieces of useful information? I. the compile and revision control history of the source code changes that caused the error II. the name of the exception that occurred III. the stack trace - Answers II, III only The enhanced for loop is A. convenient for traversing all elements in an array. B. convenient for traversing elements in a partially filled array. C. only used for arrays of integers. D. used to initialize all array elements to a common value. - Answers B Suppose you wish to write a method that returns the sum of the elements in partially filled array. Which is the best choice for a method header? A. public int sum(int[] values) B. public int sum() C. public int sum(int[] values, int currSize) D. public int sum(int[] values, int size, int currSize) - Answers C When the order of the elements is unimportant, what is the most efficient way to remove an element from an array? A. Delete the element and move each element after that one to a lower index. B. Replace the element to be deleted with the last element in the array. C. Replace the element to be deleted with the first element in the array. D. Replace the element with the next element. - Answers B It may be necessary to "grow" an array when reading inputs because A. the number of inputs may not be known in advance. B. arrays in Java must be resized after every 100 elements. C. arrays are based on powers of two. D. the only alternative is a bounds exception. - Answers A This code snippet is an implementation of what algorithm? int searchedValue = 42; int pos = 0; boolean found = false; while (pos h && !found) {if (values[pos] == searchedValue) {found = true;}else {pos++;}} A. removing an array element B. finding the maximum value in an array C. calculating the mean of values in an array D. sequential search - Answers D Which statements about array algorithms are true? I. The array algorithms are building blocks for many programs that process arrays.

Meer zien Lees minder
Instelling
CST 8116
Vak
CST 8116

Voorbeeld van de inhoud

CST 8116 QUIZ 10 QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

The true benefit of using an array lies in your ability to use a ____ as a subscript to the array.
constant
loop
command
variable - Answers variable
When you search through a list from one end to the other, you are performing a ____.
linear search
binary search
quadratic search
single lookup - Answers linear search
Which statement is true of arrays?
A. Only whole numbers can be used as array subscripts.
B. Only whole numbers can be stored in arrays.
C. Arrays cause more work for the programmer, but allow faster program execution.
D. Array elements cannot be reset after the array is declared. - Answers A
Every array has a(n) ____ size.
infinite
finite
variable
equal - Answers finite
The number of bytes in an array is always a multiple of the number of ____ in an array.
subscripts
elements
iterators
indexes - Answers elements
In every programming language, when you access data stored in an array, you must use a ____
containing a value that accesses memory occupied by the array.
superscript
subscript
key
condition - Answers subscript
Parallel arrays are most useful when value pairs have a(n) ____ relationship.
direct
indirect
linked
tiered - Answers indirect
A ____ relates parallel arrays.
superscript
key
subscript
postscript - Answers subscript
If you declare an array in Java to store boolean values, you can set each element to ____.
any number
true or false
any integer
1 or -1 - Answers true or false
When an array myArray is only partially filled, how can the programmer keep track of the current
number of elements?
A. access myArray.length()
B. maintain a companion variable that stores the current number of elements
C. access myArray.currentElements()
D. access myArray.length() - 1 - Answers B
If currLength is an integer variable that gives the number of elements currently in the array myArray,
which code snippet prints out the elements in the partially filled array of integers?
A. for (int i = 0; i < myArray.length(); i++)

Geschreven voor

Instelling
CST 8116
Vak
CST 8116

Documentinformatie

Geüpload op
16 mei 2026
Aantal pagina's
3
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$11.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
joshuawesonga22 Liberty University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
97
Lid sinds
1 jaar
Aantal volgers
1
Documenten
14119
Laatst verkocht
10 uur geleden
Tutor Wes

Hi there! I'm Tutor Wes, a dedicated tutor with a passion for sharing knowledge and helping others succeed academically. All my notes are carefully organized, detailed, and easy to understand. Whether you're preparing for exams, catching up on lectures, or looking for clear summaries, you'll find useful study materials here. Let’s succeed together!

3.9

9 beoordelingen

5
4
4
1
3
3
2
1
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen