Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

____ 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions