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 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




McGraw-Hill/Irwin