>Concorsi
>Forum
>Bandi/G.U.
 
 
 
 
  Login |  Registrati 
Elenco in ordine alfabetico delle domande di 70-176: Desktop applications with Microsoft Visual Basic 6

Seleziona l'iniziale:
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

> Clicca qui per scaricare l'elenco completo delle domande di questo argomento in formato Word!


Consider the following code snippet:



Dim myVar1 As Integer
Dim myVar2 As Integer
On Error GoTo Problem
myVar1 = "A"
On Error GoTo 0
myVar2 = "B"
Exit Sub
Problem:
Resume Next



What option would you have to set to force the program to break on the assignment to myVar1?

   Go to the Tools|Options dialog, and set Break On All Errors.
Consider the following code:



#If fDebug Then
Assert (dDivisor <> 0, "dDivisor = 0!")
#End If

Sub Assert(bExpr As Boolean, sMsg As String)
If Not bExpr Then
If MsgBox(sMsg & vbCr & _
"Continue Processing?", _
vbYesNo, "Assert") = vbNo Then
End
End If
End If
End Sub



When is Sub Assert stripped out of the code?

   Never.
Consider the following code:



Dim myVar As String
myVar = vbNullString
If myVar = Null Then
MsgBox "String is null"
Else
MsgBox "String is not null"
End If
myVar = ""
If myVar = Null Then
MsgBox "String is null"
Else
MsgBox "String is not null"
End If



What two messages will be displayed?

   “String is not null” and “String is not null”.
Consider the following code:



Dim sName()
ReDim sName(5)
sName(3) = "Smith"
Erase sName



Which of the following statements is true?

   All memory is released. The array sName needs to be declared again using ReDim before it can be reused.
Consider the following code:



form1.Show
Dim newFrm As form1
unload form1



What memory is used by the object(s) remaining in memory (do not consider the few bytes of overhead to reference the object variable)?

   The memory used by form1 is still being used.
Consider the following code:



Private Function ComputeAnswer (x As Integer, _ y As Integer)
x = x * 2
y = y / 2
ComputeAnswer = (x + y) ^ 2
End Sub
Sub Main
Dim z1 As Integer
Dim z2 As Integer
z1 = 2
z2 = 2
MsgBox ComputeAnswer(z1, z2)
End Sub



You compile the program using the Assume No Aliasing option. Which of the following statements is true?

   The value displayed in the message box is unpredictable.
Consider the following Visual Basic arithmetic operators:



Addition (+)

Division (/)

Exponentiation (^)

Modulus (Mod)



If a computation had all four types of operations, what would be the order in which the operations would be performed?

   Exponentiation, then division, then modulus, then addition