Filters
Question type

Study Flashcards

If the Boolean expression A is True and B is False, the value of the logical expression A Or B is __________.


A) True
B) False
C) 1
D) 0

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

Which statement assigns the string strAddress to label lblAddress while removing only trailing spaces?


A) lblAddress.Text = TrimStart(strAddress)
B) strAddress.TrimEnd = lblAddress.Text
C) lblAddress.Text = strAddress.Trim()
D) lblAddress.Text = strAddress.TrimEnd()

E) B) and D)
F) A) and D)

Correct Answer

verifed

verified

Because only one radio button in a group can be selected at any given time, they are said to be _________.


A) mutually exclusive
B) dependent
C) selectively unique
D) interdependent

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

To convert a copy of a string to all uppercase letters, use the method of the String object.


A) ToUpper
B) ConvertToUpper
C) ToString
D) ToUpperCase

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

If a form contains two radio buttons (rad1 & rad2) and two check boxes (chk1 & chk2) and all four of these controls reside in the same group box, which of the following expressions can never be true?


A) rad1.Checked=True and rad2.Checked=True
B) rad1.Checked=True and chk2.Checked=True
C) rad2.Checked=True and chk1.Checked=True
D) chk1.Checked=True and chk2.Checked=True

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

What value will be assigned to intIndex when the following statements execute? Dim strTarget As String = "asdsakfljfdgasldfjdl" Dim intIndex = strTarget.IndexOf("as", 1)


A) 12
B) 13
C) 0
D) -1

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

A flag is a ______variable that signals when some condition exists in the program.


A) local
B) Boolean
C) class-level
D) standard

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

What value will be assigned to intIndex when the following statements execute? Dim strTarget As String = "asdsakfljfdgasldfjdl" Dim intIndex as Integer = strTarget.IndexOf("GAS")


A) 11
B) 12
C) 0
D) -1

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

It is not possible to use a relational operator and math operators in the same expression.

A) True
B) False

Correct Answer

verifed

verified

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


A) True
B) False
C) Jim is greater
D) John is greater

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

What value will be assigned to strGrade when intScore equals 90? If intScore > 60 Then StrGrade = "D" End If If intScore > 70 Then StrGrade = "C" End If If intScore > 80 Then StrGrade = "B" End If If intScore > 90 Then StrGrade = "A" End If


A) A
B) B
C) C
D) D

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

The expression IsNumeric(13.75) returns the value __________.


A) True
B) 1375
C) 14
D) 13.75

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

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)


A) "ton"
B) "ash"
C) "Was"
D) "Washing"

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Which function accepts a string as its argument and returns True if the string contains only numeric digits?


A) IsNumber
B) IsNumeric
C) CStr
D) ToString

E) A) and D)
F) All of the above

Correct Answer

verifed

verified

Which change would correct the syntax error in the following code? 1: If intScore < 80 Then 2: strGrade = "C" 3: Else intScore > 80 Then 4: strGrade = "A" 5: End If


A) 1: If( intScore < 80 ) Then
B) 2: Set strGrade = "C"
C) 3: ElseIf intScore > 80 Then
D) none of the above correct the syntax error

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

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


A) 20000
B) 15000
C) 10000
D) 5000

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

What value will be assigned to intIndex when the following statements execute? Dim strTarget As String = "asdsakfljfdgasldfjdl" Dim intIndex = strTarget.IndexOf("as", 1, 10)


A) 12
B) 13
C) 0
D) -1

E) All of the above
F) B) and D)

Correct Answer

verifed

verified

Identify the correct Select Case statement that checks the value of a variable intMyNum and assigns a value using the following guidelines: value 1 or 7 or 15 add 100 to the variable Value 2 or 9 or 21 add 150 to the variable Value 3 or 6 or 13 add 200 to the variable None of the above set txtOutput.Text to "Cannot find it"


A) Select Case Value Case intMyNum = 1 Or 7 or 15
IntMyNum += 100
Case intMyNum = 2 Or 9 or 21
IntMyNum += 150
Case intMyNum= 3 Or 6 or 13
IntMyNum += 200
Case else
TxtOutput.Text = "Cannot find it"
End Case
B) Select Case intMyNum Case value = 1, 7, 15
IntMyNum += 100
Case value = 2, 9, 21
IntMyNum += 150
Case value = 3, 6, 13
IntMyNum += 200
Case else
TxtOutput.Text = "Cannot find it"
End Case
C) Select Case intMyNum Case 1, 7, 15
IntMyNum += 100
Case 2, 9, 21
IntMyNum += 150
Case 3, 6, 13
IntMyNum += 200
Case else
TxtOutput.Text = "Cannot find it"
End Case
D) Select Case intMyNum Case value = 1 Or value = 7 or value = 15
IntMyNum += 100
Case value = 2 Or value = 9 or value = 21
IntMyNum += 150
Case value = 3 or value = 6 Or value = 13
IntMyNum += 200
Case else
TxtOutput.Text = "Cannot find it"
End Case

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

The _keyword is required to use relational operators in a Case statement.


A) To
B) else
C) If
D) Is

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Showing 21 - 39 of 39

Related Exams

Show Answer