Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
29 views
16 pages
One Dimensional Arrays
Uploaded by
Indulgent Jodie
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save one dimensional arrays For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
29 views
16 pages
One Dimensional Arrays
Uploaded by
Indulgent Jodie
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save one dimensional arrays For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save one dimensional arrays For Later
You are on page 1
/ 16
Search
Fullscreen
Question Ansner saved Fag question Have a look at the following code: Dim sales() As Integer = (10, 20, 30, 40, 50) Select the statements to increase all elements in the array by 55 Select one! @ a. For cnt As Integer = 0 To sales.Length - 1 sales(cnt) = salesent) +55 Next ent Ob. None of the answers, oO. For ent As Integer = 0 To sales.Length-1awestion3 Answer snved Marked outof 100 ¥ lagquesion Have a lok atthe following code: Dim sales0 As integer = (1, 2,3, 4,5) For cnt As Integer = 0 To sales.Length -1 sales(cnt) = salescent) + 109, Next ent What data will now be saved in the sales(5)? Select one: a: nothing. That subscipvindex does not exist © b.100 .none ofthe answers as @ 2105 F106 «another number» auestond Aooner saved Mase curt 100 F Feg question 25. Assume that the items array is declared using the statement: Private Aritems{45) As String. ‘Which of the following statements will assing "Sue" to the LAST element of the array? Select one: O B."Sue"=Antemsi4a) CC. Aritems(o) = "Sue" © D.Arttemsias) = "sue" © Enone ofthe answers OF. "sue" = aritems(a5) G.Arttems(45) = Sue H. Arltems(43) = "Sue" Sue" = Aritems(1) J. "Sue" = Artterst) K. Arltems(1) = "Sue" ue" = Aritems(0)cuesionS Anew eves Maries oueat 100 YF Fag quescon Have a look at the following code: Dim sales() As Double = (100, 200, 300, 400, 500} For ent As Integer = 0 To sales.Length -1 sales(ent) = sales(cnt) + sales(ent)* 0.10 Next ent ‘What will this code do? Select one: © a.increase all elements in the array by R10 . none of the answers decrease all elements in the array by RO.10 © di decrease all elements in the array by R10 )e, decrease all elements in the array by 10% @ _ f.increase all elements in the array by 10% © g Increase all elements in the array by R010Question 6 osvier saved Marked out of 100 ¥ Reg question Have a look at the following code: Dim sales(@) As Integer Select the statements (0 initalise the array with the values sales(0)= 1 sales(i)=2 sales(2)=3 sales(3)=4 sales(d)=5 Select one: For ent As integer = 0 To sales.Length -1 sales = ent Next ent @ »b For ent As Integer =0 To sales.Length- 1 salesient) = (ent +1)ueton B 24, Declare + create an array with 500 elements ° store integer data at class level A. Private ArData(500)as Inceger 8. Private ArDeta(498) as Integer Private ArDatat as integer = (500) D. Private ArDatal499)as Integer Priv ‘AcData(S0!) a5 In ArData() as Integer G. none of thEach element in an array of intagersie automatically int Select one are ® 20 oat © D.NothingQuestion 10 Anevar eaves Mares outet 4, Assume the following array declaration: Dim sales() As Integer ~ (10000, 12000, 900, 500, 20000) Select the If clause that can be used to verify that the array subscript, named counter, is valid for the sales array? Select one: © Alfcounter>= 1 AndAlso caunter> saleslengtn 1 Then © B.lfcounter=0 Ortise counter = 4Then © Clfeounter>=0 Then D. none of the answ @ E:tfcounter>= 0 AndAlso counter igth- 1 Then F. if counter < sales ength -1 Then OG Ifeounter=0 Andalso winter =4 Ther CFAueston 11 Have a look at the folowing code: Dim sales()As Double = (10, 20, 3, 40, SO} Select the statements to increase all eleme: s inthe array by 50% Select ore: For ent As integer = 0To sales.Length -1 ele 50% Next ent o.8 For ent As integer = To sales.Length ales{cri)* 2.50 @« Forent As integer =0 To sales Length -1 satesien alesient)* 2.50 Nextent A adASDSVIAY ASBDYIC: Development Software 1.2 (VB Mod ) Clase Taste > Claze Test One Dimensional Arrays (10:00- 19:00 ution 12 Have alaok at the folloning cade: Dim sales As integer = {1,2,3, 4,5) For cnt As ineger = 0To sales.Length - 1 saleslent) = sales(ers)+ 100, Nextent be save in the Sales2) after the loop is execued? 1 Lavesien3 |. Wich of he following statements ceclares a one-dmensional array named values that contsine nsveriaes || senelemencs aciec oust a0 PF Fagquesion Select one: © ADimvaiues(i0) As Decimal 8. Dim values(9) As Decimal 45780) (2.990, 5890, 6780, 8 45.780,2.99D, 5.890, 6.780, 8450, Dim values) As Decimal= {5 89D, 6.780, 8.450 45 780,2.900, 5 86D, §78D, 8.450, 45 780} . None of the answ E. Dim values) As Decimal = {100} © Fbim jer 1) As Dacia @ —G Dimvaiues9) As Decimal )-H Dimvaiues0) As Decimal LTRSuestn 14 The first variable ina one-dimensional array is assigned a subscript eof Select one: ® Ao P esau oO 84 oO C2 0.3oussion 15) Markee outa cy Fig guest 9. Assume the fellewing declarations: Dim numbers) As integer 10.5 Dimsumas irs Dim counter as Integer Dimaverage es Double For counter = 1 to numbers.length -1 ‘sum = sum + numbers(counter) Next counter MessageBox Showisum) LOOK CAREFULLY ATTHE CODE. What will be displayed by the ltt ine in the dialog box? answer: [14 1 SS23. Assume that the Items array is declared using the statement: Private Aritems(99) As String. Select the best For clause to process the loop instructions for each element in the array. select one: © AFor counter as integer = 0 to 98 © _ B.Forcounter as integer = 0 to 100 © G.Forcounter as integer = 1 to 99 D. For counter as integer to 101 E. For counter as integer = 0 to 99 F.none of the answersAxrempts allowed: 2 This quit opened at Tuesday, 1 December 2020, 10:00 AN This quit will lose at Tuesday, / December 2020, 7:00 PM Time lit 40 mins Grading method: Last atzempt Summary of your previous attempts Attempt State Grade /15.00 Review 1 Finished 13.00 Submitted Tuesday, 1 December 2020, 3:30 PM Last attempt: 13.00 / 15.00.
You might also like
Lec 10 Arrays
PDF
No ratings yet
Lec 10 Arrays
40 pages
Starting Out With Programming Logic & Design - Chapter8 - Arrays
PDF
No ratings yet
Starting Out With Programming Logic & Design - Chapter8 - Arrays
20 pages
VB NET Quick Reference
PDF
100% (3)
VB NET Quick Reference
1 page
JK VB Net 8 1 Arrays
PDF
No ratings yet
JK VB Net 8 1 Arrays
21 pages
PDIM 104 Lecture03 - Variables
PDF
No ratings yet
PDIM 104 Lecture03 - Variables
33 pages
Arrays New
PDF
No ratings yet
Arrays New
48 pages
Introduction To Arrays - 2021
PDF
No ratings yet
Introduction To Arrays - 2021
47 pages
Vbhtp2e 08 Beta
PDF
No ratings yet
Vbhtp2e 08 Beta
111 pages
VB Unit 1
PDF
No ratings yet
VB Unit 1
42 pages
CH 07
PDF
No ratings yet
CH 07
97 pages
VB - Prog - Array and Frequency - Ele
PDF
No ratings yet
VB - Prog - Array and Frequency - Ele
3 pages
Functions
PDF
No ratings yet
Functions
5 pages
Visual Basic Notes & Assignments
PDF
No ratings yet
Visual Basic Notes & Assignments
35 pages
Lecture 8
PDF
No ratings yet
Lecture 8
5 pages
VBScript Examples
PDF
No ratings yet
VBScript Examples
8 pages
Programming Part 1-1
PDF
No ratings yet
Programming Part 1-1
6 pages
Programming Part 1
PDF
No ratings yet
Programming Part 1
6 pages
Sqit1013 Group 1 (Group Assignment 2)
PDF
No ratings yet
Sqit1013 Group 1 (Group Assignment 2)
7 pages
Chapt6 Part2 MultiDArray
PDF
No ratings yet
Chapt6 Part2 MultiDArray
22 pages
Jan Jacobus Spies - Form 4 Unit 2 Arrays Learner Workbook
PDF
No ratings yet
Jan Jacobus Spies - Form 4 Unit 2 Arrays Learner Workbook
11 pages
VB Script - QTP
PDF
No ratings yet
VB Script - QTP
51 pages
Lecture 7 Code Samples Eric J. Schwabe IT 236 Spring 2008
PDF
No ratings yet
Lecture 7 Code Samples Eric J. Schwabe IT 236 Spring 2008
12 pages
CSC301 - Chapter 7
PDF
No ratings yet
CSC301 - Chapter 7
23 pages
VB Variables and Operators
PDF
No ratings yet
VB Variables and Operators
33 pages
12 Arrays XXX
PDF
No ratings yet
12 Arrays XXX
34 pages
Vbu 7
PDF
No ratings yet
Vbu 7
43 pages
Arrays MR Long Summary
PDF
No ratings yet
Arrays MR Long Summary
10 pages
B.ca 3 1 p3 VB (Unit II Chapter 3)
PDF
No ratings yet
B.ca 3 1 p3 VB (Unit II Chapter 3)
5 pages
Lesson XVII:: Data Arrays and Control Arrays
PDF
No ratings yet
Lesson XVII:: Data Arrays and Control Arrays
4 pages
vb6 Array Examples
PDF
No ratings yet
vb6 Array Examples
5 pages
8 PseudocodePython
PDF
No ratings yet
8 PseudocodePython
7 pages
Array
PDF
No ratings yet
Array
9 pages
Arrays 1
PDF
No ratings yet
Arrays 1
42 pages
Understanding Arrays
PDF
No ratings yet
Understanding Arrays
26 pages
CSE 123 Introduction To Computing: Programming With Arrays
PDF
No ratings yet
CSE 123 Introduction To Computing: Programming With Arrays
29 pages
8 PseudocodePython
PDF
No ratings yet
8 PseudocodePython
9 pages
8 PseudocodePython
PDF
No ratings yet
8 PseudocodePython
9 pages
Chapter 03
PDF
No ratings yet
Chapter 03
15 pages
Introduction To VB
PDF
No ratings yet
Introduction To VB
41 pages
Pseudocode Notes
PDF
No ratings yet
Pseudocode Notes
9 pages
Chapter 8ada Arrays
PDF
No ratings yet
Chapter 8ada Arrays
13 pages
Cs116-REVISION Questions - Done By:Mr. Mustafa Radaideh - Final Revisions
PDF
No ratings yet
Cs116-REVISION Questions - Done By:Mr. Mustafa Radaideh - Final Revisions
6 pages
Lecture 8
PDF
No ratings yet
Lecture 8
24 pages
Macros (SPE Lab)
PDF
No ratings yet
Macros (SPE Lab)
10 pages
LAB 01 One-Dimensional Arrays
PDF
No ratings yet
LAB 01 One-Dimensional Arrays
12 pages
Midterm Exam Summer Solution
PDF
No ratings yet
Midterm Exam Summer Solution
10 pages
'Note 'This Program Shows How To Sort The Array by Using Bubble Sorting
PDF
No ratings yet
'Note 'This Program Shows How To Sort The Array by Using Bubble Sorting
8 pages
2012 November PDF
PDF
No ratings yet
2012 November PDF
5 pages
Public Class Private Sub As Object As Handles Dim As Integer Dim As Integer Dim As String Dim As String
PDF
No ratings yet
Public Class Private Sub As Object As Handles Dim As Integer Dim As Integer Dim As String Dim As String
7 pages
VB Sample
PDF
No ratings yet
VB Sample
9 pages
Week 13 - Arrays Intros
PDF
No ratings yet
Week 13 - Arrays Intros
7 pages
Question 1 WAP To Calculate The Factorial of Any Number (A) Using Function (B) Using Sub Procedure
PDF
No ratings yet
Question 1 WAP To Calculate The Factorial of Any Number (A) Using Function (B) Using Sub Procedure
17 pages
Problem No. 1
PDF
No ratings yet
Problem No. 1
5 pages