Chapter 18 In most applications, the values stored in an array come from

subject Type Homework Help
subject Pages 4
subject Words 674
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 18: A Ray of Sunshine (One-Dimensional Arrays)
TRUE/FALSE
1. At times, you will encounter situations where some of the variables in an application are related to
each other.
2. In the cases when you encounter situations where some variables are related, it is easier and more
efficient to treat the related variables separately.
3. The most commonly used arrays in business applications are three-dimensional.
4. Each variable in an array has the same name and data type.
5. Superscripts are assigned by the computer when an array is created in internal memory.
6. To refer to the first variable in a one-dimensional String array named strFriends, you use
strFriends(0)—read “strFriends sub zero.”
7. A procedure-level memory location has class scope, which means it can be used only
within the procedure in which it is declared.
8. You use the Private keyword to create a class-level array.
9. The number of elements is always one number more than the array’s highest subscript.
10. The elements in a numeric array are initialized to the number 1.
11. The contents of the variables (elements) in an array cannot be displayed.
page-pf2
12. In most applications, the values stored in an array come from a file on the computer’s disk and are
assigned to the array after it is declared.
13. When an array is sorted in descending order, the first element in the array contains the largest value
and the last element contains the smallest value.
14. If the subscript of an array is not in the acceptable range, the procedure should try to access the array
element to verify the correct range.
15. The For…Next statement is not appropriate when you do not know the exact number of times the
loop instructions should be repeated.
MULTIPLE CHOICE
1. A simple variable, also called a ____ variable, is one that is unrelated to any other variable in memory.
a.
scale
c.
scalar
b.
scaling
d.
plain
2. When you group together related variables, the group is referred to as a(n) ____ of variables.
a.
array
c.
set
b.
group
d.
collection
3. You distinguish one variable in a one-dimensional array from another variable in the array using a
unique number, called a(n) ____.
a.
superscript
c.
array identifier
b.
identifier
d.
subscript
4. The ____ indicates the variable’s position in the array.
a.
superscript
c.
array identifier
b.
subscript
d.
identifier
5. The first variable in a one-dimensional array is assigned a subscript of ____.
a.
0
c.
2
b.
1
d.
3
6. Assigning initial values to an array is often referred to as ____ the array.
page-pf3
a.
populating
c.
inserting
b.
initialing
d.
filling
7. The number of elements in a one-dimensional array is stored in the array’s ____.
a.
Load event
c.
highest subscript
b.
scope
d.
Length property
8. To sort the values in a one-dimensional array in ascending order, you use the ____ method.
a.
Array.Order
c.
Array.Sort
b.
Array.Arrange
d.
Array.Organize
9. Arranging data in a specific order is called ____.
a.
arranging
c.
organizing
b.
ordering
d.
sorting
10. To sort a one-dimensional array in descending order, you first sort the values in ascending order, and
then use the ____ method to reverse the array elements.
a.
Array.Reverse
c.
Array.Descending
b.
Array.Change
d.
Array.Flip
11. Memory locations declared in the form’s Declarations section have ____, which means they can be
used by any of the procedures in the form’s Code Editor window.
a.
local scope
c.
priority
b.
class scope
d.
procedure scope
12. A form’s ____ event occurs when an application is started and the form is displayed the first time.
a.
Start
c.
Load
b.
Click
d.
Begin
13. In an array, another term for subscript is ____.
a.
catalog
c.
index
b.
guide
d.
key
14. If a subscript is valid, it is said to be in ____.
a.
order
c.
index
b.
value
d.
range
15. Attempting to access an element with an invalid subscript results in a(n) ____.
page-pf4
a.
warning
c.
increase in array size
b.
run time error
d.
code correction

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.