Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bankdownload
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bankdownload
https://testbankdeal.com/product/introduction-to-programming-
using-visual-basic-10th-edition-schneider-test-bank/
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-10th-edition-schneider-solutions-manual/
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-2012-9th-edition-schneider-test-bank/
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-2012-9th-edition-schneider-solutions-manual/
https://testbankdeal.com/product/organizational-behavior-18th-edition-
robbins-solutions-manual/
Food and Culture 7th Edition Sucher Solutions Manual
https://testbankdeal.com/product/food-and-culture-7th-edition-sucher-
solutions-manual/
https://testbankdeal.com/product/principles-of-macroeconomics-7th-
edition-gregory-mankiw-solutions-manual/
https://testbankdeal.com/product/financial-accounting-a-critical-
approach-canadian-4th-edition-friedlan-test-bank/
https://testbankdeal.com/product/seeing-young-children-a-guide-to-
observing-and-recording-behavior-6th-edition-bentzen-test-bank/
https://testbankdeal.com/product/matching-supply-with-demand-an-
introduction-to-operations-management-3rd-edition-cachon-solutions-
manual/
Bensons Microbiological Applications Laboratory Manual
Complete Version 14th Edition Brown Solutions Manual
https://testbankdeal.com/product/bensons-microbiological-applications-
laboratory-manual-complete-version-14th-edition-brown-solutions-
manual/
Chapter 7 Arrays
1. After the following Dim statement is executed, how many elements will the array myVar
have?
Dim myVar(7) As Double
(A) 0
(B) 1
(C) 8
(D) 9
C
4. In the statement
Dim scores(30) As Double
the Count method is used to carry out which of the following tasks?
(A) determine the largest value for each of the elements
(B) determine the largest subscript in the array
(C) determine the smallest value for each of the elements
(D) declare a new array with the name Count
B
8. The ReDim statement causes an array to lose its current contents unless the word ReDim is
followed by the keyword
(A) CInt
(B) MyBase
(C) Preserve
(D) Add
C
9. Like other variables, array variables can be declared and assigned initial values at the same
time. (T/F)
T
10. After an array has been declared, its type (but not its size) can be changed with a ReDim
statement. (T/F)
F
11. If you use the ReDim statement to make an array smaller than it was, data in the eliminated
elements can be retrieved by using the Preserve keyword. (T/F)
F
13. What will be the size of the array stones after the following two lines of code are executed?
Dim stones() As String = {"Watts", "Jagger", "Wood", "Richards"}
ReDim Preserve stones(10)
11
is used to declare an array where each element has the value 10. (T/F)
F
17. What two names are displayed in the list box when the button is clicked on?
Dim krispies(2) as String
19. Either a For...Next loop or a For Each loop can be used to display every other value from an
array in a list box. (T/F)
F
20. An array can contain both numeric and string values. (T/F)
F
21. A Function procedure can return a number, but cannot return an array of numbers. (T/F)
F
22. What names are displayed in the list box when the button is clicked on?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim names() As String = IO.File.ReadAllLines("Data.txt")
lstBox.Items.Clear()
For i As Integer = (names.Count - 1) To 0 Step -2
lstBox.Items.Add(names(i))
Next
End Sub
Assume the five lines of the file Data.txt contain the following entries: Bach, Borodin,
Brahms, Beethoven, Britain.
(A) Bach, Brahms, and Britain
(B) Britain, Beethoven, Brahms, Borodin, and Bach
(C) Bach, Borodin, Brahms, Beethoven, and Britain
(D) Britain, Brahms, and Bach
D
24. What numbers are displayed in the list box when the button is clicked on?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim file As String = "Beatles.txt"
Dim fabFour() As String = FillArray(file)
lstBox.Items.Add(Array.IndexOf(fabFour, "Ringo")
lstBox.Items.Add(fabFour.Count - 1)
End Sub
Assume the four lines of the file Beatles.txt contain the following entries: John, Paul, Ringo,
George.
(A) 3 and 3
(B) 3 and 4
(C) 2 and 3
(D) 2 and 4
C
26. What numbers are displayed in the list box by the following program segment?
Dim numbers As String = "1492,1776,1945"
Dim temp() As String = numbers.Split(","c)
Dim nums(2) As Integer
For i As Integer = 0 to 2
nums(i) = CInt(temp(i))
Next
lstBox.Items.Add(nums(1))
lstBox.Items.Add(nums.First)
(A) 10000
(B) 11110
(C) 1110
(D) 0
B
30. Given the Dim statement below, which set of statements will initialize all elements of
myArray to 100?
Dim myArray(100) As Double
34. Consider the following Dim and assignment statements for myArray(). The assignment
statement will cause a "Subscript out of range" error. (T/F)
Dim myArray(50) As Double
myArray(34) = 51
F
35. Unless otherwise specified, Visual Basic assigns the value 0 to each element of a numeric
array when it is declared with a Dim statement. (T/F)
T
39. Which of the tasks is the Join function used to carry out in the following statement?
Dim line As String
line = Join(strArrData, ",")
(A) Join concatenates the values of all elements of the array strArrData, and adds a comma
delimiter between successive values.
(B) Join concatenates the values of all elements of line, and adds a comma to the end of the
line.
(C) Join parses or separates out all items of text that are delimited by a comma in
strArrData.
(D) Join parses or separates out all items of text that are delimited by a comma in line.
A
2. What numbers are displayed in the list box by the following program segment?
Dim numbers() As Integer = {4, 7, 9, 3, 1}
Dim query = From number in numbers
Where number > 6
Select number
lstBox.Items.Add(query.Count)
lstBox.Items.Add(query.Average)
(A) 5 and 12
(B) 2 and 12
(C) 2 and 8
(D) 5 and 8
C
3. What numbers are displayed in the list box by the following program segment?
Dim numbers() As Integer = {4, 7, 9, 3, 1, 9, 7}
Dim query = From number in numbers
Where number > 6
Select number
lstBox.Items.Add(query.Count)
lstBox.Items.Add(query.Average)
(A) 7 and 12
(B) 4 and 8
(C) 2 and 12
(D) 7 and 8
B
5. What states are displayed in the list box by the following program segment?
Dim states() As String = {"Colorado", "New Mexico", "Arizona", "Utah"}
Dim query = From state in states
Where ContainsE(state)
Select state
For Each state in query
lstBox.Items.Add(state)
Next
(A) Utah
(B) COLORADO, NEW MEXICO, ARIZONA, UTAH
(C) UTAH
(D) No states
C
7. What numbers are displayed in the list box by the following program segment?
Dim states() As String = {"Colorado", "New Mexico", "Arizona", "Utah"}
Dim query = From state in states
Where state.EndsWith("o")
Select state.Length
For Each number in query
lstBox.Items.Add(number)
Next
(A) 8 and 10
(B) 8, 10, 7, 4
(C) 8
(D) 29
A
8. What names are displayed in the list box by the following program segment?
Dim tonightShow() As String = {"Allen", "Parr", "Carson", "Leno",
"O'Brien", "Leno"}
Dim query = From host in tonightShow
Where host.Length = 4
Select host
Distinct
For Each host in query
lstBox.Items.Add(host)
Next
10. What years are displayed in the list box by the following program segment?
Dim years() As Integer = {1492, 1776, 1840, 1929, 1945, 2005}
Dim query = From year in years
Where Is20thCentury(year)
Select year
For Each yr in query
lstBox.Items.Add(yr)
Next
12. What words are displayed in the list box by the following program segment?
Dim deadlySins() As String = {"pride", "greed", "anger", "envy",
"lust", "gluttony", "sloth"}
Dim query = From sin in deadlySins
Order By sin Ascending
Where sin.StartsWith("g")
Select sin
lstBox.Items.Add(query.First)
lstBox.Items.Add(query.Max)
13. What words are displayed in the list box by the following program segment?
Dim deadlySins() As String = {"pride", "greed", "anger", "envy",
"lust", "gluttony", "sloth"}
Dim query = From sin in deadlySins
Order By sin.Length Descending
Select sin.ToUpper
lstBox.Items.Add(query.First)
lstBox.Items.Add(query.Min)
Fredrikshall.
— Tuossa, ota koko rasia, mutta elä siitä sen enempää puhu! —
kuiskasi hän, ja katosi taas kuin outo kulkija, jonka ohi maantiellä
pikimmittäin kuljetaan.
*****
Se oli kuningas.
*****
Kuningas oli rakennuttanut itselleen lautavajan vallihaudan
reunalle, vuorenrinteelle, piiritettävän linnan eteen ja sinne siirrettiin
sänky, pöytä ja tuoli. Ovella ei seisonut vartioivaa sotamiestä ja se
ainoa ajutantti, joka majassa oli vahtina, oli usein poissa asioilla.
Kuningas oli voittanut entisen kammonsa yön yksinäisyyttäkin
kohtaan eikä sallinut enää passaripojan maata vuoteensa vieressä.
Päivän vaivoista väsyneenä nukahti hän väliin ulos vallille suoraan
vihollisten tykkien eteen tai vallihaudassa työskenteleväin sotilasten
keskelle. Kuka tahansa olisi pimeässä voinut hiipiä esiin ja
miekanpistolla sammuttaa hänen elämänsä. Nuo unettomat ja
tuskan täyttämät yöt, jotka hän oli viettänyt Ukrainassa
vastoinkäymisen ensi musertavan iskun jälkeen, eivät olleet häneen
muuta jälkiä jättäneet, kuin arventapaisia poimuja kulmakarvojen
väliin. Hän oli karaissut sielunsa onnettomuuksissa samoinkuin
ruumiinsa retkeilyillä. Hän ei koskaan minuuttiakaan miettinyt
uhkaavaa vaaraa, mutta hän tiesi, että se nyt riippui hänen päänsä
päällä raskaana pilvenä ja lähempänä kuin milloinkaan ja tämä tieto
hänet täytti kuluneen nuoruuden varmalla levolla. Hänen äänensä oli
kovennut, mutta tuo käskevä tyyneys sytytti nuorentavan kiillon
hänen silmäänsä. Hänen ympärilleen kasaantui pimeänä ryhmänä
kaikki kurjuus ja kaikki onnettomuudet, mitä ajatella voi, vaan
nojautuen katajasauvaansa ja usein kärsimätönnä toruen johti hän
soturien työtä.
Toisinaan katseli hän taivasta ja haki sieltä niitä tähtiä, jotka hän
tunsi, mutta kun sumu laskeusi ja pimensi seudun, sulki hän väliin
silmänsä ja laski sormillaan: — Kolmesataa…
kolmesataakahdeksankymmentä… yhdeksänkymmentä…
yhdeksänkymmentäneljä… neljäsataatuhatta riikintalaria! —
Voineeko Görtz todellakin saada niin paljo kokoon joulukuuksi. Miten
voi sotajoukon muuten pitää pystössä? Ja jokohan Görtz kahden
päivän perästä saapunee? Eikö juuri hänen odoteltavissa oleva
saapumisensa levittäne erityistä levottomuutta leiriin? Mutta minkäpä
sille tekee? Kuningas ei tuntenut katumusta eikä epäillyt, hänestä oli
tullut erakko, joka halveksi rahaa ja tavaraa. Eikö ruotsalaiset olleet
nimittäneet häntä houkkioksi ja ojentaneet kättään ottaakseen
hänen ruununsa? No niin, sen hän antoi heille anteeksi, vastattuaan
heille sopivalla tavalla, mutta viimeiseen asti tahtoi hän pitää heidät
koossa, vaikka sitten palakoon talo ja mantu. Eikö ollut se vala,
jonka hän oli sydämmessään vannonut, eikö se ollut Jumalan käsky?
Nyt ei ole velttojen aika, sellaisten, jotka tahtovat vuoteissaan
vetelehtää. Entäpä Görtzin julistus, jossa joka pitäjäntuvan seinällä
hänen kuninkaallinen nimensä komeilee petollisten lupausten alla,
joissa puhutaan rauhasta ja alamaisten parhaasta? Missä hän pitkillä
sotaretkillään oli nähnyt ruhtinasten hädän hetkenä menettelevän
toisin? Ja kumminkin, eikö heidän kansansa kutsunut heitä viisaiksi
ja hyviksi, jos he vain onnistuivat? Kun myrsky oli ohi tahtoi hän
pitää tarkastuksen ja asettaa kaikki taas oikeaan kuntoonsa.
Ankaruutta oli hän käskenyt… ei koskaan tietensä mitään väärää.
Nyt oli valloitettava Fredriksstenin linna, joka hänen edessään seisoi
tunturin harjalla harmaamuurisena ja teräväsärmäisenä sulkien tien
Norjaan. Olihan Gyldenlöwin etuvarustus jo valloitettu miekka
kädessä.
— Ei vielä!
*****
Mörner vastasi:
— Ette yhteenkään.
— Elkää peljätkö!
testbankdeal.com