Question: ____ 26. What is wrong with the following GetName procedure? Sub GetName(ByVal strName As String) strName = InputBox(Enter your Name:) End Sub a. The procedure

____ 26. What is wrong with the following GetName procedure? Sub GetName(ByVal strName As String) strName = InputBox(Enter your Name:) End Sub

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.

____ 27. Which statement is not true regarding functions?

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

____ 30. Which is the correct way to define a function named Square that receives an integer and returns an integer representing the square of the input value?

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!