• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/20

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

20 Cards in this Set

  • Front
  • Back

If the boolean expression on the left side of an OrElse operator is true, the boolean expression on the right side of the Or operator will not be evaluated.




True


False

True

In the following statement that begins a For Next loop, what is the purpose of the Step clause?


For intX = 1 to 100 Step 5




It causes intX to be initialized to 5 when the loop begins.


It causes intX to be incremented by 5 each time the loop repeats.


It causes intX to be decremented by 5 each time the loop repeats.


It causes the loop to end when intX is equal to 5.

It causes intX to be incremented by 5 each time the loop repeats.

If the boolean expression A is True and B is False, the value of the logical expression A And B is ________.




False


1


0


True

False

A ToolTip is a ________ that allows the programmer to create a small popup message that displays when the user places the mouse over a control.




function


method


property


control

Control

Which of the following statements will display a message box with the text "line 1" on one line, and the text "line 2" on another line?




MessageBox.Show("line 1" & ControlChars.Crlf & "line 2")


MessageBox.Show("line 1" & "\n" & "line 2")


MessageBox.Show("line 1" "line 2")


MessageBox.Show("line 1" & ControlCharsCrLf & "line 2")

MessageBox.Show("line 1" & ControlChars.Crlf & "line 2")

What is the difference in the execution of the Do Until Loop (first example) and the Do Loop Until (second example)?




' First Example


sngPayAmount = 200


Do Until sngPayAmount > 150


sngPayAmount = sngPayAmount — 50Loop




'Second ExamplesngPayAmount = 200


Do sngPayAmount = sngPayAmount — 50


Loop Until sngPayAmount > 150




The first loop will execute one more time than the second loop.


The first loop will never be executed while the second loop will execute once.


Both loops are executed in an identical manner.


The first loop will never be executed while the second is an infinite loop.

d. The first loop will never be executed while the second is an infinite loop.

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




selectively unique


dependent


interdependent


mutually exclusive

mutually exclusive

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?




rad1.Checked=True and rad2.Checked=True


chk1.Checked=True and chk2.Checked=True


rad1.Checked=True and chk2.Checked=True


rad2.Checked=True and chk1.Checked=True

rad1.Checked=True and rad2.Checked=True

The ________ method adds a new entry as the last item in a ListBox.




Items.New


Items.Add


Items.Append


Items.Insert

Items.Add

The logical operators (And, Or, Xor, Not) combine two or more boolean expressions.




True


False

True

How many times will the message I love Visual Basic be displayed?




Dim intCount As Integer = 0


Do




lstOutPut.Items.Add("I love Visual Basic")


intCount += 1


Loop While intCount > 10




It will not be displayed at all.


It will display 2 times.


It will display 10 times.


It will display once.



It will display once.

What value is assigned to the String variable strSecond when the following code is executes?




Dim strFirst As String


Dim strSecond As String


strFirst = "1 2 Button My Shoe"


strSecond = strFirstName.ToUpper()




" BUTTON MY SHOE"


"1 2 BUTTON MY SHOE"


"1 2 bUTTON mY sHOE"


"12BUTTONMYSHOE"

"1 2 BUTTON MY SHOE"

When debugging a program in break mode, the Step Into command causes the currently highlighted line of code to execute.




True


False

X

Which of the following code segments assigns the string "Great Year" to a label named lblMessage when the value in the variable sngSales is either greater than 50,000, or equal to 50,000?




If sngSales < 50000 Then


lblMessage.Text = "Great Year"


End If




If sngSales >= 50000 Then


lblMessage.Text = "Great Year"


End If




If sngSales <= 50000 Then


lblMessage.Text = "Great Year"


End If




If sngSales > 50000 Then


lblMessage.Text = "Great Year"


End If



If sngSales >= 50000 ThenlblMessage.Text = " Great Year"< /span>End If

Which statement is not true regarding functions?




Visual Basic has many built-in functions such as CSng(txtInput.Text)


A function is a self contained set of statements that can receive input values.


A function can only return a single value.


The same function can return several data types including integer, string, or double

The programmer cannot determine the content of a message box title bar.




True


False

False

Which of the following functions accepts a parameter named dblSales and returns the commission to the calling statement? Assume that the commission should equal the sales multiplied by the commission rate. Use the following table as a guide to the calculation of the commission rate.


SalesCommission Rateless than 2,00010%2,000 or more15%




Function Calc(ByVal dblSales As Double) As Double Dim dblRate As Double Select Case dblSales Case Is < 2000 dblRate = .1 Case Is >= 2000 dblRate = .15 End Select Return dblRate * dblSalesEnd FunctionFunction Calc(ByVal dblSales As Double, ByRef dblComm As Double) Dim dblRate As Double Select Case dblSales Case Is < 2000 dblRate = .1 Case Is >= 2000 dblRate = .15 End Select DblComm = dblRateEnd FunctionFunction Calc(ByVal dblSales As Double) As Double Dim dblRate, dblComm as Double Select Case dblSales Case Is < 2000 dblRate = .1 Case Is >= 2000 dblRate = .15 End Select dblCommission = dblRate * dblSalesEnd FunctionFunction Calc(ByVal dblSales As Double, ByRef dblComm as Double) Dim dblRate As Double Select Case dblSales Case Is < 2000 dblComm = .1 * dblRate Case Is >= 2000 dblComm = .15 * dblRate End SelectEnd Function

Function WhatIsIt(ByVal intRepeat as Integer) as Integer


Dim intResult as Integer = 1


Dim intCount as Integer


For intCount = 1 to intRepeat


intResult = intResult * 2


Next intCount


Return intResult


End Function




MultiplyByTwo


SquareRootsOfTwo


PowersOfTwo


TwoPlusTwo

X

Which of the following displays a message box to the user?




MessageBox.Show


DisplayMessageBox


MessageBox.Display


MessageBox.Output

MessageBox.Show

The expression IsNumeric(13.75) returns the value ________.




14


13.75


1375


True

True