VB.Net/VB.Net Mcq Question Set 8 Sample Test,Sample questions

Question:
 A form’s _______ event is triggered when you click the Close button on its title bar.

1. Close

2.CloseForm

3. FormClose

4.FormClosing


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


Question:
 The items in a list box belong to a collection called the ______

1.Collection

2. Items Collection

3. Items Add

4. Add


Question:
 The _____statement does not indicate whether a variable is passed by value or by reference.

1.Call

2.Parameter

3.Function

4.Declaration


Question:
 The ___________ keyword tells the computer to pass the variable’s address rather than its contents.

1.ByRef

2. ByVal

3.ByAdd

4.ByPoint


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


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


Question:
A form’s ____________ event is triggered when the computer processes the Me.Close() statement.

1.Close

2.Closing

3.FormClose

4. FormClosing


Question:
A function can receive information either by value or by _________

1.Reference

2.Address

3.Pointer

4.Value


Question:
A function’s header includes the ___________ data type.

1.As

2.To

3.From

4.By.nametags


Question:
A millisecond is ________ of a second.

1.1/1000

2. 1/100

3.1/10

4.1/10000


Question:
A ______ allows you to select from a list of choices.

1. Combo Box

2.Combo List

3.Check Box

4. Radio Button


Question:
A _______displays a list of choices.

1. List box

2.Display box

3.Choice box

4.Check box


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


Question:
Every variable has both a value and ______

1.Unique address

2.Value

3.Name

4.Relative address


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


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


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


Question:
The functions header and footer contains the _____ keyword.

1.Function

2.Struct

3.Sub

4.Class


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


Question:
The items in a combo box belong to which collection?

1.Items

2. List

3. ListBox

4.Values


Question:
The items in a list box are sorted based on the ___________ characters in each item.

1. Leftmost

2.Rightmost

3.Previous

4. Next


Question:
The items listed in the Call statement are referred to as _________

1.Arguments

2.Parameters

3.Passers

4. Callers


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


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


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


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


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


Question:
To delay program execution, you can use the ______

1.Refresh Method

2. Sleep method

3.Count method

4.Accumulator method


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


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


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


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


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


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


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


Question:
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.


Question:
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)


Question:
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”


Question:
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)


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


Question:
Which property is used to specify a combo box’s style?

1.ComboBoxStyle

2. DropDownStyle

3.DropStyle

4.Style property


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


Question:
______ statement is the last statement in the function.

1. Footer

2.Header

3.Return

4.Call


Question:
_______ method is used to remove space from beginning and end of a string.

1. Trim

2.Remove

3.Truncate

4.DeleteSpace


Question:
________ method allows you to insert anywhere in the string.

1.Remove

2.Insert

3. Import

4.delete


Question:
________ returns a value after performing its specific task.

1.Function Procedure

2. Sub procedure

3.Sub block

4.Structure


Question:
_________ in flowchart is used to represent a for clause.

1.Circle

2.Rectangle

3.Parallelogram

4.Hexagon


Question:
_________ method is used to remove specified number of characters located anywhere in the String.

1.Trim

2.Remove

3.Truncate

4.DeleteSpace


Question:
__________ and ________ methods are used to align characters in a String.

1. PadLeft, PadRight

2.Left, Right

3.LeftAlign, RightAlign

4.AlignLeft, AlignRight


More MCQS

  1. VB.Net Mcq Question Set 1
  2. VB.Net Mcq Question Set 2
  3. VB.Net Mcq Question Set 3
  4. VB.Net Mcq Question Set 4
  5. VB.Net Mcq Question Set 5
  6. VB.Net Mcq Question Set 6
  7. VB.Net Mcq Question Set 7
  8. VB.Net Mcq Question Set 8
  9. VB.Net Mcq Question Set 9
  10. VB.Net Mcq Question Set 10
  11. VB.Net Mcq Question Set 11
  12. VB NET MCQ SET 1
  13. VB NET MCQ SET 2
  14. VB NET MCQ SET 3
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!