Pregunta 1
Pregunta
What is value of "z" assigned when this executed completely ?
Pregunta 2
Pregunta
Choose all appropriate Variable names
Pregunta 3
Pregunta
Are you ready for your test?
Pregunta 4
Pregunta
Choose all inappropriate Variable Names
Respuesta
-
integer
-
//( ◕‿‿◕ )\
-
EndSub
-
Then
-
Name
-
Total
Pregunta 5
Pregunta 6
Pregunta
Which event able to load the form automatically when the program executed?
Respuesta
-
Form.load
-
MyBase.load
-
load張form唔該
-
Pleaseload.form
Pregunta 7
Pregunta
Which VB code contain identical meaning with following equation
Pregunta 8
Pregunta
What value is stored in Y when the code executed?
Pregunta 9
Pregunta
We can Declare a Character type Variable, Named as Thisisquestion, by Following Code
Pregunta 10
Pregunta
Select all the data type, with valid variable type name, acceptable for VB
Respuesta
-
int
-
integer
-
married
-
float
-
double
-
bool
-
boolean
-
String
-
字串
-
single
Pregunta 11
Pregunta
What is output of following code?
Pregunta 12
Pregunta
select all suitable syntax of comment in VB
Respuesta
-
'( ˘•ω•˘ )◞⁽˙³˙⁾
-
'この僕を、ここまで追い詰めるとはね。まあ、いいさ。
-
//呢個係答案
-
"This is not a comment syntax
-
This is a comment
-
/*揀呢個*/
-
'This is a comment syntax'
Pregunta 13
Pregunta
Select all inappropriate syntax for VB
Pregunta 14
Pregunta
What is output of following code?
Pregunta 15
Pregunta
Select all event handler for VB
Respuesta
-
load
-
click
-
textchanged
-
hit
-
同我揪左佢
Pregunta 16
Pregunta
Maxlength is one of property of textbox limitation of input string length
Pregunta 17
Pregunta
All inputed number from textbox is integer
Pregunta 18
Pregunta
Which code can add new string to listBox , Named ListBox.
Pregunta 19
Pregunta
Which value is assigned in Variable x when program executive before line 9
Pregunta 20
Pregunta
What is value stored in x ?
Respuesta
-
54
-
36
-
15
-
30
-
compile error
Pregunta 21
Pregunta
What is correct syntax structure of Function?
Respuesta
-
Function Name (Byxxx Variable As DataType, .... ) As Data Type
-
Datatype Name(Parameters) As Data Type
-
Datatype Name(Parameters)
-
Function Name (Byxxx Variable As DataType, .... )
Pregunta 22
Pregunta
Select all appropriate syntax of function
Respuesta
-
Function CalTotal( price, quantity) As Double
-
Function ChrckGrade(ByVal Mark As Double, ByRef SubjectCode As Integer) As Character
-
int GetPrice( Sting Product)
-
int GetPrice( Sting Product) As Double
-
Function GetName(ByVal ID As Integer) As String
-
Function A(ByVal B As single,ByRef C As long) As String
-
Sub GotoSchool (ByBus Yes As String, ByMTR No As Integer)
Pregunta 23
Pregunta
What is correct syntax of Sub-Procedures?
Pregunta 24
Pregunta
Select all inappropriate syntax of Sub-Procedures
Respuesta
-
Sub Total()
-
Function sub()
-
sub Total(ByVal Quantity As Double, ByVal Price As Double) As String
-
sub Total(ByVal Quantity As Double, ByBus Price As Double)
-
sub CheckValid() Is Boolean
-
Sub(Total, byval x As String)
-
Sub Total(ByRef Valid As Boolean, ByVal Name As String)
Pregunta 25
Pregunta
Dim [blank_start]x As Integer[blank_end]
if x > 6 [blank_start]then[blank_end]
x = int(5.17 +7.14)
else [blank_start]if[blank_end] x < 5
x = 9
[blank_start]End if[blank_end]
Respuesta
-
x As Integer
-
then
-
if
-
End if
Pregunta 26
Pregunta
Name All the Controls
Respuesta
-
Label
-
InputBox
-
TextBox
-
CheckBox
-
Buttons
-
ListBox
-
Form
-
MyBase
-
Me
Pregunta 27
Pregunta
Dim Price,Quantity As Double
Price = 3.5
Quantity = 4
Dim total As Double = [blank_start]CalTotal(Price, Quantity)[blank_end] 'Calculate the total by Price * Quantity
ListBox.items.[blank_start]add[blank_end](total)
[blank_start]Function[blank_end] CalTotal([blank_start]ByVal[blank_end] Price [blank_start]As Double[blank_end], [blank_start]ByVal[blank_end] Quantity [blank_start]As Double[blank_end]) [blank_start]As Double[blank_end]
Return [blank_start]Price * Quantity[blank_end]
[blank_start]End Function[blank_end]
Pregunta 28
Pregunta
Two numeric strings ("11","22",etc...) can calculate directly without any conversion function(Cint(),CDbl(),...etc) applied .
Pregunta 29
Pregunta
What is output of this code?
Pregunta 30
Pregunta
Which is global (class-level) Variable?
Respuesta
-
local
-
classlevel
-
both
-
none of them
Pregunta 31
Pregunta
Select all local variable(s).
Respuesta
-
classlevel
-
pass
-
local
-
none of them
-
all of them
Pregunta 32
Pregunta
What is the output of following code?
Pregunta 33
Pregunta
What Value Stored,For Variable "result", when the program executed line 7?
Respuesta
-
"-1NoNo"
-
"437"
-
"-148"
-
Compile error
Pregunta 34
Pregunta
Complete the following Blanks with the expected result:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim x As [blank_start]Integer[blank_end] = 35
Dim y As Integer = 53
[blank_start]SetLabel(x, y)[blank_end]
Dim [blank_start]total[blank_end] As Integer = [blank_start]Sum(x, y)[blank_end]
TextBox1.Text = total
End Sub
Function Sum[blank_start](ByVal x As Integer, ByVal y As Integer)[blank_end]
Return x + y
[blank_start]End Function[blank_end]
Sub SetLabel(ByVal x As Integer, ByVal y As Integer)
Label2.Text = [blank_start]x & " + " & y & " = "[blank_end]
[blank_start]End Sub[blank_end]
End Class
Respuesta
-
Integer
-
SetLabel(x, y)
-
Label.text(x,y)
-
ClassSub(SetLabel,x,y)
-
String
-
Long
-
total
-
Sum
-
End Function
-
End
-
End Sub
-
End Functions
-
End Subs
-
x & " + " & y & " = "
-
x + y =
-
" x + y ="
-
(ByVal x As Integer, ByVal y As Integer)
-
(ByVal Integer As x, ByVal Integer As y)
-
(int x, int y) As Integer
-
Sum(x, y)
-
Call.function(sum,x,y,integer)
-
我要呢個function(加埋,傳x及y) 唔該
Pregunta 35
Pregunta
IndexOf() able to return length of string
Pregunta 36
Pregunta
length() return integer about the number of characters in the target string
Pregunta 37
Pregunta
trim() able to cut out all spaces, no matter the offset of that spaces in that string
Pregunta 38
Pregunta
We can use "-" operator to append two strings together
Pregunta 39
Pregunta
Return type of Function Math.sqrt() is Double
Pregunta 40
Pregunta
All conditional statement in if block is logical expression
Pregunta 41
Pregunta
What is the return boolean value of following logical expression:
Assume A = Ture, B = False
Not((A And B) Or ( B or B))
Pregunta 42
Pregunta
What is Boolean value of following logical expression:
Assume A is True
(Not A Or A) And Not (A or Not A)
Pregunta 43
Pregunta
What is output of following code?
Pregunta 44
Pregunta
Select all typical programming errors
Respuesta
-
logical error
-
syntax error
-
runtime error
-
Benson is the error
-
Spelling error
-
都Q知自己錯乜
-
Nothing error
-
compile error
Pregunta 45
Pregunta
syntax error regards there are some inappropriate flow of execution of code
Pregunta 46
Pregunta
logical error not affect the execution of program when compiling the code
Pregunta 47
Pregunta
the programme suddenly stopped when runtime error occurred.
Pregunta 48
Pregunta
In Flowchart diagram, rectangle is used to represent process of the program design
Pregunta 49
Pregunta
In Flowchart diagram, Oval is used to represent start or end of the program design
Pregunta 50
Pregunta
Name all diagram with the flowchart
Respuesta
-
Start
-
circle
-
Start
-
End
-
Process
-
Nothing
-
Termial
-
Process
-
Decision
-
Input
-
Output
-
Decision
-
The diagram is so 唔識串
-
input
-
output
-
looping