Exam 6: Procedures and Functions
Exam 1: Introduction to Programming and Visual Basic40 Questions
Exam 2: Creating Applications With Visual Basic36 Questions
Exam 3: Variables and Calculations41 Questions
Exam 4: Making Decisions39 Questions
Exam 5: Lists and Loops36 Questions
Exam 6: Procedures and Functions31 Questions
Exam 7: Multiple Forms, Modules, and Menus36 Questions
Exam 8: Arrays and More34 Questions
Exam 9: Files, Printing, and Structures36 Questions
Exam 10: Working With Databases32 Questions
Exam 11: Developing Web Applications33 Questions
Exam 12: Classes, Collections, and Inheritance36 Questions
Select questions type
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)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)