Frage 1
Frage
"ThisisaVaraible" is a VAILD variable name for integer.
Frage 2
Frage
Select all valid Variable Name
Antworten
-
SKTT1_Faker
-
Click
-
Mybase.Load
-
int
-
Integer
-
_Orz_
-
わたしがいれば十分ですよ
-
ThisisaComment
-
!Yes
-
_Cat_
Frage 3
Frage
Select all appropriate statement
Antworten
-
sub is not a reserved word for sub-procedure
-
Integer is a kind of data type for VB
-
Load is an event handler
-
Variable name cannot contain number
-
"Benson" is not a valid variable name
Frage 4
Frage
What is output of following code?
Frage 5
Frage
What is output of following code?
Frage 6
Frage
Select all Valid Function Parameter Passing Method
Antworten
-
byVal
-
byRef
-
參數傳落去
-
共用記憶
-
byBus
-
byTaxi
-
Value
-
Reference
Frage 7
Frage
Write a Complete Command for a String Variable Declaration, name is Benson, that assigned a value "A0".
[blank_start]Dim[blank_end] Benson [blank_start]As[blank_end] [blank_start]String[blank_end] [blank_start]=[blank_end] [blank_start]"A0"[blank_end]
Frage 8
Frage
An Event Handler is a kind of Sub-procedure.
Frage 9
Frage
What is out of following Code?
Frage 10
Frage
Select all inappropriate error types
Antworten
-
syntax error
-
runtime error
-
logical error
-
Benson is really a error
-
知道自己錯乜駛你教咩
-
Spelling error
-
My life is a error
Frage 11
Frage
What is output of following code?
Frage 12
Frage
Select all suitable code for VB
Frage 13
Frage
Select all appropriate event handler(s) for Button
Antworten
-
load
-
click
-
比利卡 比利那那 撲撲利那 比比路多
-
パメルクラルク ラリロリポップン
-
clicklaDon'twastmytime
Frage 14
Frage
Select all suitable control(s) for VB
Antworten
-
Text Box
-
List Box
-
Group Box
-
Pizza Box
-
Input Box
-
Message Box
Frage 15
Frage
What is output of following code?
Dim x,y,z As Integer
x = 15
y = x + 1
z = 10 + Math.Sqrt(y)
z += Math.Round(z ^ 2)
TextBox2.Text = z
Antworten
-
14
-
210
-
56280
-
compile error
Frage 16
Frage
Complete the code that output will identical with the calculation of equation
Dim a , b, c As Double
c = [blank_start]Math.sqrt(b^(5-2)+(a^6/b))[blank_end]
Textbox.text = c
Antworten
-
Math.sqrt(b^(5-2)+(a^6/b))
-
Math.round(b^(5-2)+(a^6/b))
-
(b^(5-2)+(a^6/b))
-
Math.sqrt(b*(5-2)+(a^6/b))
-
2*Math.sqrt(b^(5-2)+(a^6/b))
Frage 17
Frage
A Variable able to store more than one value.
Frage 18
Frage
A original value will be replaced when a new value assigned to the variable.
Frage 19
Frage
What is output of following code?
Frage 20
Frage
Complete a correct syntax for the following code
Dim a,b,c As Integer
if a < b [blank_start]Then[blank_end]
c = 16
else [blank_start]if a > b Then[blank_end]
c = 17
[blank_start]else[blank_end]
c =18
[blank_start]End if[blank_end]
Antworten
-
End if
-
Endif
-
else
-
otherwise
-
if a > b Then
-
a > b Then
-
a > b
-
Then
-
therefore
Frage 21
Frage
What is output of following code?
Frage 22
Frage
What is output of following code?
Antworten
-
25000
-
50000
-
500
-
compile error
Frage 23
Frage
Rewrite the following code using for looping.
Private Sub btnDisplay_Click(...) Handles _btnDisplay.Click
Dim s As String = "stressed"
[blank_start]DisplayHeader(s)[blank_end]
[blank_start]DisplayLetter(s)[blank_end]
End Sub
Sub DisplayHeader(ByVal s As [blank_start]String[blank_end])
lstOutput.Items.Add("If you feel " & s & ", eat: ")
End Sub
[blank_start]Sub[blank_end] DisplayLetter(ByVal s As String)
For count [blank_start]As Integer[blank_end] = 1 To [blank_start]s.Length[blank_end] Step 1
lstOutput.Items.Add([blank_start]s.Substring(s.Length - count, 1)[blank_end])
[blank_start]Next[blank_end]
[blank_start]End Sub[blank_end]
Antworten
-
DisplayHeader(s)
-
DisplayHeader(s,s.length)
-
DisplayLetter(s)
-
DisplayLetter(s,s.length)
-
Sub
-
Function
-
End Sub
-
EndSub
-
End Function
-
EndFunction
-
As Integer
-
As String
-
s.Length
-
7
-
s.Substring(s.Length - count, 1)
-
s.Substring(s.Length - 1, count)
-
s.Substring(count, s.Length -1)
-
String
-
Char
-
Double
-
Next
-
Loop
-
End For
-
Endfor
Frage 24
Frage
The Program is still executable when logical error occurred
Frage 25
Frage
When "Your life is a Bug" error is occurred, the program is still executable
Frage 26
Frage
Complete the code with following result
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [blank_start]Button1.Click[blank_end]
Dim input As String = TextBox2.Text
Dim countWord As Integer = 1
If input.Length > 0 Then
'A checking for empty input
Do While [blank_start]input.Length[blank_end] > 0
'A checking the remained words
If [blank_start]input.IndexOf(" ") <> -1[blank_end] Then
'Check occurrance of Space Bar when counting Word
input = [blank_start]input.Substring(input.IndexOf(" ") + 1)[blank_end]
'if Space Bar found, the word before the space will be "cut"
[blank_start]countWord += 1[blank_end]
'increase the word count
Else
[blank_start]input = ""[blank_end]
'when the no space remain, then clear the string
End If
Loop
Else
[blank_start]countWord = 0[blank_end]
'set the word count as zero, when no input
End If
lstOutput.Items.Add(countWord)
End Sub
Antworten
-
Button1.Click
-
Button1.Load
-
Button1.二字拑羊馬
-
input.Length
-
input.Howlongisthestring
-
input.IndexOf(" ") <> -1
-
input.IndexOf(" ") Is found
-
input.Substring(input.IndexOf(" ") + 1)
-
nput.Substring(input.IndexOf(" "))
-
countWord += 1
-
countWord -= 1
-
countWord++;
-
countWord = 0
-
countWord.empty
-
input = ""
-
input.清空佢()
Frage 27
Frage
What is the correct syntax of "For loop"?
Antworten
-
For I As Integer = 0 To 30 Step 5 ... Next
-
For I As Integer = 0 To 30 Step 5 ... Loop
-
For(int i = 0; i <= 30; i = i+5){
....
}
-
For Loop From I As Integer = 0 To 30 .... Next
Frage 28
Frage
What is the output of following code?
Frage 29
Frage
Consider the following code, What value is stored in the Variable x ?
Dim Array() As String = {"Nagato", "Shimakaze", "FubuKi", "Amatsuk"}
Dim x As Integer = Array.count
Frage 30
Frage
Consider the following code, What value is stored in the Variable x ?
Dim Array() As String = {"Nagato", "Shimakaze", "FubuKi", "Amatsuk"}
Dim x As Integer
For i As Integer = 1 To Array.Count - 1
x += Array(i).Length
Next
Frage 31
Frage
Dim Array() As String = {"Nagato", "Shimakaze", "FubuKi", "Amatsuk"}
Dim x As Integer
For i As Integer = 0 To Array.Count
x += Array(i).Length
Next
Frage 32
Frage
Declare a Array, Name As FourFoolWarships for storing four strings : Haruna, Kongo, Hiei, Kirishima.
[blank_start]Dim[blank_end] [blank_start]FourFoolWarships()[blank_end] [blank_start]As[blank_end] [blank_start]String[blank_end] [blank_start]=[blank_end] [blank_start]{"Haruna","Kongo","Hiei","Kirishima"}[blank_end]
Antworten
-
Dim
-
Str
-
FourFoolWarships()
-
FourFoolWarships
-
As
-
Is
-
為
-
String
-
String()
-
字串序列
-
刀劍神域.序列戰爭
-
FourFoolWarships(4)
-
FourFoolWarships(3)
-
=
-
->
-
==
-
賦予
-
{"Haruna","Kongo","Hiei","Kirishima"}
-
["Haruna","Kongo","Hiei","Kirishima"]
-
"Haruna","Kongo","Hiei","Kirishima"
-
{'Haruna','Kongo','Hiei','Kirishima'}
-
Haruna,Kongo,Hiei,Kirishima
-
榛名,金剛,比叡,霧島
-
定義
-
金剛四傻(4)
Frage 33
Frage
Consider the following code, The Value of x is True
Dim A As Boolean = True
Dim B As Boolean = False
Dim x As Boolean = (A Or Not B) And A = -1
Frage 34
Frage
Consider the following code, The Value of x is False.
Dim A As Integer = 15
Dim B As Integer = 13
Dim x As Boolean = (Not (A < B) And A > 0) And (A = B + 2)
Frage 35
Frage
Select All Appropriate Syntax for Declaration of Function Header
Antworten
-
Function Name(ByVal Variable As Integer) As String
-
string Name(int variable)
-
Dim Name(ByVal Variable As Integer) As Funciton
-
Function Name(ByVal Variable As Integer) As Character
-
Function Name(int variable) As String
-
Function Name(ByRef Variable As Integer) As String
-
Function Name(ByBus Variable As Integer) As String
-
Function Name(ByVal Variable As Married) As Single
-
None of above
Frage 36
Frage
Consider the following code, what value is stored in variable Answer
Dim Array() As String = {"Kamikaze","Asakaze","Harukaze","matsukaze","Hatakaze"}
Answer = Array(3).Toupper()
Antworten
-
Harukaze
-
MATSUKAZE
-
HARUKAZE
-
none of above
Frage 37
Frage
Name all the controls in this UI
Antworten
-
MyBase
-
Form
-
From
-
表格呀!
-
Label
-
StringBox
-
TextBox
-
LabelBox
-
TextLabel
-
List
-
ListLabel
-
GroupBox
-
ListBox
-
Button
-
LabelButton
-
Warspite
-
Warspite.jpg
-
PictureBox
-
PictureLabel
-
Your Wifu
-
MessageBox
Frage 38
Frage
The return value of string.Trim() is [blank_start]String[blank_end]
Antworten
-
String
-
Character
-
Double
-
Integer
-
Nothing
-
a value
Frage 39
Frage
What is output of following code?
Frage 40
Frage
Which of following code is identical the code shown below
h /= h / 3
Frage 41
Frage
Are you ready for your Examination?
Frage 42
Frage
Complete the following code in order the have the shown result.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim Array() As Integer = {5, 6, 4, 1}
TextBox2.Text = [blank_start]CStr(Array(3))[blank_end]
End Sub
Antworten
-
CStr(Array(3))
-
Array(4)
-
CStr(Array(4))
-
CStr(Array().3)
-
CInt(Array(3))
-
CArray(Array(3))
-
CStr(Array(1))
Frage 43
Frage
Write a code for completing following Combinations Calculation (nCr)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Button1.Text = CStr(CombinationCalculation(CInt(N.Text), CInt(R.Text)))
End Sub
Function CombinationCalculation(ByVal n As Integer, ByVal r As Integer) As Double
Return [blank_start]Factorial(n)[blank_end] / ([blank_start]Factorial(r)[blank_end] * [blank_start]Factorial(n - r)[blank_end])
End Function
[blank_start]Function[blank_end] Factorial(ByVal num As Integer) As [blank_start]Double[blank_end]
Dim Ans As Double = 1
For count As Integer = [blank_start]num To 1[blank_end] Step -1
Ans [blank_start]*=[blank_end] count
Next
[blank_start]Return Ans[blank_end]
[blank_start]End Function[blank_end]
Antworten
-
Factorial(n)
-
Factorial(r)
-
Factorial(n - r)
-
Double
-
Long
-
Integer
-
*=
-
+=
-
*
-
+
-
=
-
Return Ans
-
Return count
-
Function
-
sub
-
End Function
-
End Sub
-
num To 1
-
1 To num
Frage 44
Frage
The following code will cause exception when executing.
Dim Array() As Integer = {2,4,5,7}
Dim x = Array(5)
'get the number 5 in the Array
Frage 45
Frage
What exception caused when following code executing.
Dim Arrary(5) As Integer = {1,2,3,4,5,6}
Dim x As Integer = Array(Array.count)
Antworten
-
IndexOutofRangeException
-
都唔知你問乜
-
Array Exception
-
This code is correct
Frage 46
Frage
We can check the largest index of the array by using "Array.count - 1" command
Frage 47
Frage
Return Value of Array.count of an Array(10) is 9
Frage 48
Frage
All output of Textbox is [blank_start]String[blank_end]
Antworten
-
String
-
Character
-
Number
-
Answer
-
乜都好啦 話之佢
Frage 49
Frage
Which is class-level Variable?
Antworten
-
ThisScropeVariable
-
int
-
classlevel
-
scopeVariable
-
None of above
Frage 50
Frage
Which of following Commands have looping feature in VB?