Student Center
|
Instructor Center
|
Information Center
|
Home
Intro to VB.NET
Projects
Comprehensive Projects
Choose a Chapter
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter Objectives
PowerPoint Presentations
Multiple Choice Quiz
True or False
Examples from the Text
Feedback
Help Center
Learning Programming Using Visual Basic.Net
Bill Burrows, University of Washington
Joe Lanford, University of Rochester
Performing Calculations and Manipulating Data
Multiple Choice Quiz
1
Expressions are comprised of which of the following:
A)
constants
B)
variables
C)
functions
D)
All of the above
2
Which of the following is
not
a typical type of expression:
A)
numeric
B)
string
C)
assignment
D)
logical
3
Which of the following strings would have the smallest value when used in a string comparison operation?
A)
VISUAL BASIC
B)
Visual Basic!
C)
VISUAL basic .NET
D)
visual BASIC
4
What operation is the following piece of code performing:
PasswordValid = UserText = StoredPassword
A)
Assigning UserText and PasswordValid the value stored in StoredPassword
B)
Assigning PasswordValid the result of the logical expression comparing the value of UserText to the variable StoredPassword
C)
Assigning StoredPassword and UserText the value stored in PasswordValid
D)
Nothing
5
What will the value of the variable MyValue be after the following line of code executes?
MyValue = 5 Mod 25 + 4 / 3 * 10 Mod 30
A)
15
B)
18
C)
5
D)
None of the above
6
What is the term given to the event in which a computer attempts to store a number that is larger than the variable can hold?
A)
IllegalCastExpression
B)
Invalid Assignment
C)
Overflow
D)
Roundoff Error
7
This error occurs when a computer's inability to accurately represent base-10 fractions in base-2 notation produces incorrect results.
A)
Radix error
B)
Base-conversion mismatch
C)
Roundoff Error
D)
Overflow
8
What will the value of ThisVar be after the following lines of code execute?
Dim ThisVar As String
Dim MyName = "John"
ThisVar = MyName & "John"
A)
"John"
B)
"True"
C)
"JohnJohn"
D)
"MyNameJohn"
9
What will the value of ThisExpression be after the following lines of code execute?
Dim ThisExpression As Boolean
Dim MyName = "John"
ThisExpression = ((MyName = ("Jo" & "hn")) And (Not(0)))
A)
False
B)
"John"
C)
True
D)
"MyNameJohn0"
10
What will the message box display after the following lines of code execute?
Dim X As Integer
Dim Y As Integer
Dim Z As Integer
Dim E As String = "Divide by Zero Error"
Y = 4
X = (Y = (6 Mod Y))
Try
Z = (X / Y)
MsgBox(Z)
Catch
MsgBox(E)
End Try
A)
4
B)
2
C)
"Divide by Zero Error"
D)
None of the above
2003 McGraw-Hill Higher Education
Any use is subject to the
Terms of Use
and
Privacy Policy
.
McGraw-Hill Higher Education
is one of the many fine businesses of
The McGraw-Hill Companies
.