Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

____ 11. What is the value of intTotal after the following code executes? Dim intNumber1 As Integer = 2 Dim intNumber2 As Integer = 3

____ 11. What is the value of intTotal after the following code executes?

Dim intNumber1 As Integer = 2 Dim intNumber2 As Integer = 3 Dim intTotal As Integer intTotal = AddSquares(intNumber1, intNumber2)

Function AddSquares(ByVal intA As Integer, ByVal intB As Integer) As Integer intA = intA * intA intB = intB * intB Return intA + intB intA = 0 intB = 0 End Function

a. 0 b. 5 c. 10 d. 13

____ 15. Which of the following examples correctly uses an input box to assign a value to an integer, and returns the integer to the calling program using a reference parameter?

a. Sub GetInput(ByVal intNumber As Integer) intNumber = CInt(InputBox(Enter an Integer)) End Sub

b. Sub GetInput(ByRef intNumber As Integer) intNumber = CInt(InputBox(Enter an Integer)) End Sub

c. Sub GetInput(ByRef intNumber As Integer) intNumber = CInt(InputBox(Enter an Integer)) Return intNumber End Sub

d. Sub GetInput() Dim intNumber As Integer intNumber = CInt(InputBox(Enter an Integer)) End Sub

____ 22. Choose a new, more descriptive name for the WhatIsIt function based on the result of the code below.

Function WhatIsIt(ByVal intRepeat as Integer) as Integer Dim intResult as Integer = 1 Dim intCount as Integer For intCount = 1 to intRepeat intResult = intResult * 2 Next intCount Return intResult End Function a. PowersOfTwo b. SquareRootsOfTwo

c. MultiplyByTwo d. TwoPlusTwo

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_2

Step: 3

blur-text-image_3

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions