Bus Applications Programming

User Generated

yrbyrbyrb

Programming

Description

Answer those Assignment question

Unformatted Attachment Preview

PART A-MULTIPLE CHOICE QUESTIONS (1 mark each / total 10 marks) 1. After the execution of the following program, Dim x As Integer = 0 For i As Integer = 1 To 2 For j As Integer = 12 To 10 Step -1 xt=i Next j Next i the value of the variable x is A. 8 B. 9 C. 10 D. None of above 2. After the execution of the following program, Dim x As Integer = 10 Dim y As Integer = 1 While (x > 1) y=x+1 x= x - 1 End While the value of the variable y is ndows 2. After the execution of the following program, Dim x As Integer = 10 Dim y As Integer = 1 While (x > 1) y=x+1 X=X-1 End While the value of the variable y is A. 1 B. 2 C. 3 D. None of above 3. After the execution of the following program, Dim x As Integer = 10 Dim y As Integer = 1 Do y=x+1 X=X-1 Loop Until (x< 1) the value of the variable y is A. 1 B. 2 C. 3 D. None of above e 3. After the execution of the following program, Dim As Integer = 10 Dim y As Integer =1 Do y=x+1 X=X-1 Loop Until (x< 1) the value of the variable y is A. 1 B. 2 C. 3 D. None of above 1 4. After the execution of the following program, Dim x(As Integer = {10, 20, 30) Dim y As Integer = 0 For Each i As Integer In x For Each j As Integer In x If (i = j) Then y+=1 End If Next j Next i the value of the variable y is A. 1 B. 2 c 3 e A 4. After the execution of the following program, Dim x() As Integer = {10, 20, 30) Dim y As Integer = 0 For Each i As Integer In x For Each j As Integer In x If (i =j) Then y+= 1 End If Next j Next i the value of the variable y is A. 1 B. 2 C. 3 D. None of above 5. After the execution of the following program, Dim x() As Boolean = {False, True, False} Dim y As String = "Guess" For Each i As Boolean In x If (Not i) Then y &=y End If Next the value of the variable y is A. Guess B. Guess Guess C. Guess Guess Guess D. GuessGuess Guess Guess 0 BE e Dimy For Each i As Boolean In x If (Not i) Then y &=y End If Next the value of the variable y is A. Guess B. Guess Guess C. GuessGuessGuess D. Guess Guess Guess Guess 6. Suppose that the VB.NET subroutine “Simple" is defined as follows: Sub Simple (ByRef a As Integer, ByVal b As Integer) Dim temp As Integer temp = a a=b b = temp End Sub Which of the following VB.NET code segments is illegal and thus will result in a compiling error? A. Dim a As Integer = 1 Dim b As Integer = 3 Simple(a, b) B. Dim a As Integer = 1 Simple(a, 3) C. Dim a As Integer = 1 Simple(a, a+2) D. Simple(1, 3)
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello buddy, i have finished the assignment. Thank you for giving me that opportunity to work with you.

PART A: MULTIPLE CHOICE QUESTIONS.

Question number Answer from the choices
1

B. 9

2

C. 3

3

B. 2

4

C. 3

5

D. GuessGuessGuessGuess

6

C

7

B. x=20 and y=10

8

A. 0

9

B. 5

10

D

PART B-PROGRAMMING QUESTIONS
1. Answer
Module M...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags