A) A function is a self-contained set of statements that can receive input values.
B) Visual Basic has many built-in functions such as CSng(txtInput.Text)
C) A function can only return a single value.
D) The same function can return several data types including integer, string, or double
Correct Answer
verified
Multiple Choice
A) 60
B) 50
C) 0
D) 70
Correct Answer
verified
Multiple Choice
A) The procedure is missing a Return statement.
B) GetName is a reserved word and cannot be used as a name of a procedure.
C) strName will be modified, but all changes will be lost when the procedure ends.
D) The syntax for the call to InputBox is incorrect.
Correct Answer
verified
Multiple Choice
A) 0
B) 20
C) 40
D) (cannot be determined)
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) Function Square(ByVal intNum as Integer) As Integer Return
intNum * intNum
End Function
B) Function Square(ByVal intNum as Integer)
Return intNum * intNum
End Function
C) Function Square(ByVal intNum as Integer) As Double
Return intNum * intNum
End Function
D) Function Square(ByVal intNum as Integer) As Double
Dim dblAns as Double
DblAns = intNum * intNum
Return dblAns
End Function
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) control returns to the point where the procedure was called and continues with the next statement
B) the application terminates unless the procedure contains a Return statement
C) control transfers to the next procedure found in the code
D) the application waits for the user to trigger the next event
Correct Answer
verified
Multiple Choice
A) they help to break up a large body of code into smaller chunks
B) they make it easier to maintain and modify code
C) the execution time is significantly reduced by calling procedures and functions
D) they permit the same sequence of code statements to be called from multiple places
Correct Answer
verified
Multiple Choice
A) Sub MyProcedure()
End Sub
B) Sub myprocedure()
End Sub
C) Sub my_procedure()
End Sub
D) Sub myProcedure()
End Sub
Correct Answer
verified
Multiple Choice
A) intAns should not be declared inside the Function.
B) the as Integer at the end of the Function heading should be eliminated.
C) the function does not return a value
D) parameters intA and intB should be declared as ByRef
Correct Answer
verified
Showing 21 - 31 of 31
Related Exams