Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

ISTM 250 - CONCEPTUAL EXAM 3 QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

Document preview thumbnail
Preview 2 out of 7 pages

ISTM 250 - CONCEPTUAL EXAM 3 QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026 When you declare and initialize the values in an array, you are actually creating an instance of what class? - Answers Array To refer to the ninth element in a one-dimensional array named sales, you code - Answers sales[8] To refer to the second column in the fourth row of a rectangular array named vendors, you code - Answers vendors[3,1] Which of the following statements creates an array of decimals named miles and assigns the values 27.2, 33.5, 12.8, and 56.4 to its elements? - Answers decimal[ ] miles = {27.2m, 33.5m, 12.8m, 56.4m}; Which of the following for statements adds each element in a one-dimensional array named totals to a string named message? for (int i = 0; i totals.Size; i++) message += totals[i] + "|"; for (int i = 0; i totals.Length; i++) message += total + "|"; for (int i = 0; i totals.Length; i++) message += totals[i] + "|"; for (int i = 1; i = totals.Length; i++) message += total + "|"; - Answers for (int i = 0; i totals.Length; i++) message += totals[i] + "|"; Which of the following foreach statements adds each element in a one-dimensional array named totals to a string named message? foreach (total : totals) message += total + "|"; foreach (total in totals) message += total + "|"; foreach (decimal total : totals) message += total + "|"; foreach (decimal total in totals) message += total + "|"; - Answers foreach (decimal total in totals) message += total + "|"; Which of the following statements declares a valid rectangular array? string[,] js = new string[,]; string[,] js = new string[4,4]; string[ ][ ] js = new string[ ][ ]; string[ ][ ] js = new string[4][4]; - Answers B. string[,] js = new string[4,4]; Which of the following statements gets the number of strings in the array that follows? string[ ] customers = new string[55]; int size = customers.UpperBound; int size = customers.Length; int size = customers.Size(); int size = Arrays.Size(customers); - Answers int size = customers.Length; Which of the following method declarations is valid for a method that accepts an array of strings named customerNames? private string[] ParseCustomerNames(customerNames){} private void ParseCustomerNames(customerNames){} private void ParseCustomerNames(customerNames string[]){} private void ParseCustomerNames(string[] customerNames){} - Answers private void ParseCustomerNames(string[] customerNames){} Which of the following statements sorts a one-dimensional array named values? values = Array.Sort(values); Array.Sort(values); values = ArrayList.Sort(values); ArrayList.Sort(values); - Answers Array.Sort(values); You can use the BinarySearch() method of the Array class to - Answers search for a value in a sorted array and return the index of that value Which .NET feature is used by typed collections but not by untyped collections? - Answers Generics When compared to untyped collections, typed collections reduce - Answers the number of runtime errors and the amount of casting that's required Which of the following is not true about collections? Some collections use indexes that start with 1. The capacity of a collection is adjusted automatically as new elements are added. The items in all collections can be modified. Collections can be used to store any type of object. - Answers Some collections use indexes that start with 1. Which of the following statements declares a typed List collection named dueDays that will hold int values? List dueDays = new List(); Listint dueDays = new Listint(); IntList dueDays = new IntList(); ArrayList dueDays = new ArrayList(); - Answers Listint dueDays = new Listint(); Given a typed List collection of int values named dueDays, which of the following statements adds the value 120 to the end of the list? dueDays.Add(120); dueDays.Append(120); dueDays.Insert(120); dueDays.Insert(0, 120); - Answers dueDays.Add(120); Which of the following is not true about a SortedList collection? Key values must be added to a sorted list in alphabetical order. You use the DictionaryEntry structure to work with an element of a sorted list. You can use a key to get its associated value. Each element in a sorted list consists of a key value and a related value. - Answers Key values must be added to a sorted list in alphabetical order. A queue provides: an Item property for getting any item in the collection an Add() method for adding an item to the collection a Remove() method for removing an item from the collection a Dequeue() method for getting the next item in the collection - Answers a Dequeue() method for getting the next item in the collection What is the value of kilos[1] after the code that follows is executed? decimal[] kilos = {200, 100, 48, 59, 72}; for (int i = 0; i kilos.Length; i++) { kilos[i] *= 2.2; } - Answers 220.0 What is the value of times[2,1] in the array that follows? decimal[,] times = { {23.0, 3.5}, {22.4, 3.6}, {21.3, 3.7} }; - Answers 3.7 What is the value of lists after the statements that follow are executed? string[,] names = new string[200,10]; int lists = names.GetLength(0); - Answers 200

Content preview

ISTM 250 - CONCEPTUAL EXAM 3 QUESTIONS ANSWERED
CORRECTLY LATEST UPDATE 2026


When you declare and initialize the values in an array, you are actually creating an
instance of what class? - Answers Array
To refer to the ninth element in a one-dimensional array named sales, you code -
Answers sales[8]
To refer to the second column in the fourth row of a rectangular array named vendors,
you code - Answers vendors[3,1]
Which of the following statements creates an array of decimals named miles and
assigns the values 27.2, 33.5, 12.8, and 56.4 to its elements? - Answers decimal[ ]
miles = {27.2m, 33.5m, 12.8m, 56.4m};
Which of the following for statements adds each element in a one-dimensional array
named totals to a string named message?

for (int i = 0; i < totals.Size; i++) message += totals[i] + "|";
for (int i = 0; i < totals.Length; i++) message += total + "|";
for (int i = 0; i < totals.Length; i++) message += totals[i] + "|";
for (int i = 1; i <= totals.Length; i++) message += total + "|"; - Answers for (int i = 0;
i < totals.Length; i++) message += totals[i] + "|";
Which of the following foreach statements adds each element in a one-dimensional
array named totals to a string named message?
foreach (total : totals) message += total + "|";
foreach (total in totals) message += total + "|";
foreach (decimal total : totals) message += total + "|";
foreach (decimal total in totals) message += total + "|"; - Answers foreach (decimal
total in totals) message += total + "|";
Which of the following statements declares a valid rectangular array?
string[,] js = new string[,];
string[,] js = new string[4,4];
string[ ][ ] js = new string[ ][ ];
string[ ][ ] js = new string[4][4]; - Answers B. string[,] js = new string[4,4];
Which of the following statements gets the number of strings in the array that
follows? string[ ] customers = new string[55];
int size = customers.UpperBound;
int size = customers.Length;
int size = customers.Size();
int size = Arrays.Size(customers); - Answers int size = customers.Length;
Which of the following method declarations is valid for a method that accepts an
array of strings named customerNames?
private string[] ParseCustomerNames(customerNames){}
private void ParseCustomerNames(customerNames){}
private void ParseCustomerNames(customerNames string[]){}
private void ParseCustomerNames(string[] customerNames){} - Answers private
void ParseCustomerNames(string[] customerNames){}
Which of the following statements sorts a one-dimensional array named values?
values = Array.Sort(values);
Array.Sort(values);
values = ArrayList.Sort(values);

, ArrayList.Sort(values); - Answers Array.Sort(values);
You can use the BinarySearch() method of the Array class to - Answers search for a
value in a sorted array and return the index of that value
Which .NET feature is used by typed collections but not by untyped collections? -
Answers Generics
When compared to untyped collections, typed collections reduce - Answers the
number of runtime errors and the amount of casting that's required
Which of the following is not true about collections?
Some collections use indexes that start with 1.
The capacity of a collection is adjusted automatically as new elements are added.
The items in all collections can be modified.
Collections can be used to store any type of object. - Answers Some collections use
indexes that start with 1.
Which of the following statements declares a typed List collection named dueDays
that will hold int values?
List dueDays = new List();
List<int> dueDays = new List<int>();
IntList dueDays = new IntList();
ArrayList dueDays = new ArrayList(); - Answers List<int> dueDays = new
List<int>();
Given a typed List collection of int values named dueDays, which of the following
statements adds the value 120 to the end of the list?
dueDays.Add(120);
dueDays.Append(120);
dueDays.Insert(120);
dueDays.Insert(0, 120); - Answers dueDays.Add(120);
Which of the following is not true about a SortedList collection?
Key values must be added to a sorted list in alphabetical order.
You use the DictionaryEntry structure to work with an element of a sorted list.
You can use a key to get its associated value.
Each element in a sorted list consists of a key value and a related value. - Answers
Key values must be added to a sorted list in alphabetical order.
A queue provides:

an Item property for getting any item in the collection
an Add() method for adding an item to the collection
a Remove() method for removing an item from the collection
a Dequeue() method for getting the next item in the collection - Answers a Dequeue()
method for getting the next item in the collection
What is the value of kilos[1] after the code that follows is executed?
decimal[] kilos = {200, 100, 48, 59, 72};
for (int i = 0; i < kilos.Length; i++)
{
kilos[i] *= 2.2;
} - Answers 220.0
What is the value of times[2,1] in the array that follows?
decimal[,] times = { {23.0, 3.5}, {22.4, 3.6}, {21.3, 3.7} }; - Answers 3.7
What is the value of lists after the statements that follow are executed?
string[,] names = new string[200,10];
int lists = names.GetLength(0); - Answers 200

Document information

Uploaded on
September 7, 2026
Number of pages
7
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
joshuawesonga22
3.5
(14)
Sold
121
Followers
2
Items
15186
Last sold
3 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions