McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor Center | Information Center | Home
Intro to VB.NET
Projects
Comprehensive Projects
Chapter Objectives
PowerPoint Presentations
Multiple Choice Quiz
True or False
Examples from the TextA
Feedback
Help Center


Learning Programming Using Visual Basic.Net
Bill Burrows, University of Washington
Joe Lanford, University of Rochester

Reducing Program Complexity: Programmer-Defined Procedures and Functions

Multiple Choice Quiz



1

When writing complex programs, it is often helpful and necessary to break a large process or task into smaller ________.
A)Subtasks
B)Problems
C)Answers
D)Programs
2

A _______ ___ procedure contains statements necessary to perform a single subtask, and usually is given a descriptive name somewhat like a meta statement.
A)broken down
B)general sub
C)Both A and B
D)None of the above
3

One of the benefits of breaking code into subtasks is that it makes your general sub procedures ________ , making it usable by more than one procedure.
A)expendable
B)reliable
C)reusable
D)extensive
4

A(n) _________ ____ is a statement which will transfer execution to a specified subroutine or procedure, and once that is complete, execution will continue with the next statement in the previous block of code.
A)execution jump
B)code pointer
C)procedure call
D)flow modifier
5

Given the following section of code, if a programmer called the GetAge() subroutine, what value would the message box display?

Private Sub GetAge()
Dim UserAge As String = 0
UserAge = InputBox("Enter your age","Get Age")
ShowAge()
End Sub

Private Sub ShowAge()
Dim UserAge As Integer = 0
MessageBox(UserAge)
End Sub
A)Whatever the user entered in the GetAge() subroutine
B)0
C)1
D)Nothing - this code will cause an error
6

_________ _______ is a technique used to send local data between a calling procedure and the procedure being called.
A)Parameter passing
B)Information sharing
C)Procedure treason
D)Demilitarizing data
7

A(n) _________ ____ is a group of data items declared in a procedure heading surrounded by parenthesis which indicate the information that a called procedure expects to be passed.
A)data sheet
B)parameter list
C)function prototype
D)data declaration
8

The list of data elements in a procedure call that will be passed to the called procedure is called a(n) ________, and the corresponding variable declared in the procedure heading of the called procedure is referred to as a(n) _________.
A)argument, parameter
B)parameter, argument
C)argument, argument
D)parameter, parameter
9

Which of the following statements is not true about user-defined functions?
A)Functions have parameter lists just like general sub procedures
B)Variables declared inside the function are global to the entire module
C)Functions are not associated with any control (they handle no events)
D)Just like built-in functions, user-defined functions return a value to the caller
10

A(n) _____ form is one in which receives all input from the user, and any other controls on any other form do not react to events.
A)exclusive
B)proprietary
C)busy
D)modal




McGraw-Hill/Irwin