Exam 6: Procedures and Functions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following can be returned by a function?

(Multiple Choice)
4.8/5
(43)

What is assigned to lblDisplay.Text when the following code executes? Dim intNumber As Integer = 4 AddOneintNumber, 6) LblDisplay.Text = intNumber ' Code for AddOne Public Sub AddOneByVal intFirst As Integer, ByVal intSecond As Integer) IntFirst += 1 IntSecond += 1 End Sub

(Multiple Choice)
4.8/5
(38)

Which one of the following declarations uses Pascal casing for the procedure name?

(Multiple Choice)
4.7/5
(29)

In the context of Visual Basic procedures and functions, what is an argument?

(Multiple Choice)
4.9/5
(55)

Which statement is true in regard to passing an argument by value to a procedure?

(Multiple Choice)
4.8/5
(37)

What is incorrect about the following function? Function sumByVal intX As Integer, ByVal intY As Integer) As Integer Dim intAns As Integer IntAns = intX + intY End Function

(Multiple Choice)
4.9/5
(38)

Which of the following code examples is a function that will accept three integer parameters, calculate their average, and return the result?

(Multiple Choice)
4.9/5
(35)

What is wrong with the following GetName procedure? Sub GetNameByVal strName As String) StrName = InputBox"Enter your Name:") End Sub

(Multiple Choice)
4.9/5
(35)

Which statement is not true regarding functions?

(Multiple Choice)
4.8/5
(42)

What is the syntax error in the following procedure? Sub DisplayValueDim intNumber As Integer) MessageBox.ShowintNumber.ToString)) End Sub

(Multiple Choice)
4.8/5
(40)

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?

(Multiple Choice)
4.8/5
(43)
Showing 21 - 31 of 31
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)