Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Starting Out With Visual Basic
Quiz 4: Making Decisions
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
What value is assigned to the variable strSnip when the following statements execute?
Dim strSnip As String Dim strFullString As String = "Washington" StrSnip = strFullString.Substring(7)
Question 2
Multiple Choice
If the Boolean expression A is True and B is False, the value of the logical expression A And B is __________.
Question 3
Multiple Choice
What value is assigned to decTaxes by the following program segment, assuming that the user enters 50000 into the textbox txtSalary.Text?
Dim decSalary, decTaxes As Decimal DecSalary = CDec (txtSalary.Text) If (decSalary > 50000) Then DecTaxes = .40 * decSalary ElseIf (decSalary > 40000) Then DecTaxes = .30 * decSalary ElseIf (decSalary > 30000) Then DecTaxes = .20 * decSalary Else DecTaxes = .10 * decSalary End If
Question 4
Multiple Choice
What value will be assigned to intIndex when the following statements execute?
Dim strTarget As String = "asdsakfljfdgasldfjdl" Dim intIndex = strTarget.IndexOf("as", 1, 10)
Question 5
Multiple Choice
What value will be assigned to intIndex when the following statements execute?
Dim strTarget As String = "asdsakfljfdgasldfjdl" Dim intIndex = strTarget.IndexOf("as", 1)
Question 6
Multiple Choice
Because only one radio button in a group can be selected at any given time, they are said to be _________.
Question 7
Multiple Choice
What is assigned to lblMessage.Text when the following code segment executes?
Dim strName1 As String = "Jim" Dim strName2 As String = "John" If strName1 > strName2 Then LblMessage.Text = "Jim is greater" Else LblMessage.Text = "John is greater" End If
Question 8
Multiple Choice
What value is assigned to the variable strSnip when the following statements execute?
Dim strSnip As String Dim strFullString As String = "Washington" StrSnip = strFullString.Substring(1, 3)
Question 9
Multiple Choice
A flag is a ______variable that signals when some condition exists in the program.
Question 10
Multiple Choice
To convert a copy of a string to all uppercase letters, use the method of the String object.
Question 11
Multiple Choice
Suppose you want to verify that the user has entered a value into a text box named txtInput. Which of the following code segments responds with an appropriate message if the user does not enter a value?
Question 12
Multiple Choice
Which function accepts a string as its argument and returns True if the string contains only numeric digits?
Question 13
Multiple Choice
The first character in a string has an index of .
Question 14
Multiple Choice
The _keyword is required to use relational operators in a Case statement.
Question 15
Multiple Choice
Suppose you want to determine whether a variable, decPayAmount, is between 1200 and 1400, inclusively. If it is, you want to set lblMessage text to "Pay amount is in the range". Which of the following code segments will accomplish this?