A form’s _______ event is triggered when you click the Close button on its title bar.
1. Close
2.CloseForm
3. FormClose
4.FormClosing
Between the function’s _____________ and ___________________ you enter the instructions to process when the function is invoked.
1. Header and footer
2.Parameters and arguments
3.Call and return
4.Return type and function name
The ___________ keyword tells the computer to pass the variable’s address rather than its contents.
1.ByRef
2. ByVal
3.ByAdd
4.ByPoint
The _____statement does not indicate whether a variable is passed by value or by reference.
1.Call
2.Parameter
3.Function
4.Declaration
The items in a list box belong to a collection called the ______
1.Collection
2. Items Collection
3. Items Add
4. Add
What will the following code display in the lblSum control? Dim intSum As Integer Dim intY As Integer Do While intY < 3 For intX As Integer = 1 To 4 intSum = intSum + intX Next intX intY = intY + 1 Loop lblSum.Text = Convert.ToString(intSum)
1.5
2.8
3.15
4.30
Which of the following instructs a function to return the contents of the decStateTax variable?
1.Return decStateTax
2.Return ByVal decStateTax
3.Send decStateTax
4.SendBack decStateTax
______ statement is the last statement in the function.
1. Footer
2.Header
3.Return
4.Call
_______ method is used to remove space from beginning and end of a string.
1. Trim
2.Remove
3.Truncate
4.DeleteSpace
________ method allows you to insert anywhere in the string.
1.Remove
2.Insert
3. Import
4.delete
________ returns a value after performing its specific task.
1.Function Procedure
2. Sub procedure
3.Sub block
4.Structure
_________ in flowchart is used to represent a for clause.
1.Circle
2.Rectangle
3.Parallelogram
4.Hexagon
_________ method is used to remove specified number of characters located anywhere in the String.
1.Trim
2.Remove
3.Truncate
4.DeleteSpace
__________ and ________ methods are used to align characters in a String.
1. PadLeft, PadRight
2.Left, Right
3.LeftAlign, RightAlign
4.AlignLeft, AlignRight
A ______ allows you to select from a list of choices.
1. Combo Box
2.Combo List
3.Check Box
4. Radio Button
A _______displays a list of choices.
1. List box
2.Display box
3.Choice box
4.Check box
A form’s ____________ event is triggered when the computer processes the Me.Close() statement.
1.Close
2.Closing
3.FormClose
4. FormClosing
A function can receive information either by value or by _________
1.Reference
2.Address
3.Pointer
4.Value
A function’s header includes the ___________ data type.
1.As
2.To
3.From
4.By.nametags
A millisecond is ________ of a second.
1.1/1000
2. 1/100
3.1/10
4.1/10000
Each memory location listed in the parameterList in the procedure header is referred to as _______
1.an address
2.a constraint
3.a parameter
4.a value
Every variable has both a value and ______
1.Unique address
2.Value
3.Name
4.Relative address
How many times will the MessageBox.Show method in the following code be processed? For intNum As Integer = 5 To 1 Step -1 MessageBox.Show(“Hi”) Next intNum
1. 6
2.5
3. 4
4. 70
Passing a copy of the variable is referred to as _________
1.Pass by value
2.Pass by address
3.Pass by reference
4.Pass by pointer
Passing a variable’s address is referred to as __________
1.Pass by value
2.Pass by address
3.Pass by reference
4.Pass by pointer
The ______ ensures that the computer processes any previous lines of code that affect the interface’s appearance.
1.Refresh Method
2.Sleep method
3. Count method
4.Accumulator method
The _______________ event occurs when the user either types a value in the text portion of a combo box or selects a different item in the list portion.
1.ChangedItem
2.ChangedValue
3.SelectedItemChanged
4.TextChanged
The functions header and footer contains the _____ keyword.
1.Function
2.Struct
3.Sub
4.Class
The item that appears in the text portion of a combo box is stored in which property?
1.SelectedText
2.SelectedValue
3.Text
4.TextItem
The items in a combo box belong to which collection?
1.Items
2. List
3. ListBox
4.Values
The items in a list box are sorted based on the ___________ characters in each item.
1. Leftmost
2.Rightmost
3.Previous
4. Next
The items listed in the Call statement are referred to as _________
1.Arguments
2.Parameters
3.Passers
4. Callers
The number of characters contained in a String is stored as Integer in String’s ______
1.Substring property
2. Length property
3.Reverse property
4. Index property
The number of choices the user can select is controlled by the list box’s _______
1. SelectionModeProperty
2.Select Property
3.Check Property
4. IsSelect Property
The position of an item in a list box depends on the value stored in the list box’s _______
1.Ascending property
2.Descending Property
3.Sorted property
4.Unsorted property
To delay program execution, you can use the ______
1.Refresh Method
2. Sleep method
3.Count method
4.Accumulator method
To determine whether a variable is being passed to a procedure by value or by reference, you will need to examine ______
1.the Call statement
2.the procedure header
3.the statements entered in the procedure
4.the procedure footer
To pass a variable by value, you include the keyword ________________ before the name of its corresponding parameter.
1.ByVal
2.Val
3.PassVal
4. Pass
What value is stored in the intNum variable when the loop ends? For intNum As Integer = 5 To 1 Step -1 MessageBox.Show(“Hi”) Next intNum
1.0
2.1
3.2
4.3
What will be in strName after the following code is executed? strName=”Joanne Hashen” strName=strName.Insert(7,”C.”);
1. Joanne C. Hashen
2.JoanneC.hashen
3. Joanne
4. C.Hashen
What will be the value of num after the following Visual Basic code is executed? strName=”Veronica Yardley” num=strName.Length
1.15
2.16
3.14
4.17
What will contain in txtFirst after the following Visual Basic code is executed? strName = "Penny Swanson" txtFirst.Text = strName.Remove(5)
1. Penny
2.Swanson
3.Penny S
4.y Swanson
Which of the following is false?
1.A function can return one or more values to the statement that invoked it
2.A procedure can accept one or more items of data passed to it
3.The parameter List in a procedure header is optional
4.At times, a memory location inside the computer’s internal memory may have more than one name
Which of the following is false?
1.The sequence of the arguments listed in the Call statement should agree with the sequence of the parameters listed in the receiving procedure’s header.
2.The data type of each argument in the Call statement should match the data type of its corresponding parameter in the procedure header.
3.The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the procedure header.
4.The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the procedure header.
Which of the following rounds the contents of the intNum variable to three decimal places?
1.Math.Round(3, intNum)
2.Math.Round(intNum, 3)
3. Round.Math(intNum, 3)
4.Round.Math(3, intNum)
Which of the following selects the Cat item, which appears third in the cboAnimal control?
1.cboAnimal.Selected = 2
2.cboAnimal.Selected = “Cat”
3.cboAnimal.Text = “Cat”
4.cboAnimal.SelectedIndex=”Cat”
Which of the following statements pauses program execution for 1 second?
1.System.Threading.Thread.Pause(1000)
2.System.Threading.Thread.Pause(1)
3. System.Threading.Thread.Sleep(1000)
4.System.Threading.Thread.Sleep(100)
Which of the following statements prevents a form from being closed?
1.e.Cancel = False
2. e.Cancel = True
3. e.Close = False
4. sender.Close = False
Which property is used to specify a combo box’s style?
1.ComboBoxStyle
2. DropDownStyle
3.DropStyle
4.Style property
You specify each item to display in a list box using the Items collection’s________
1.Add method
2. Subtract method
3.Divide method
4.Multiply method