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

Question:
 Data in an array can be distinguished using _______ number.

1.Reference

2.Subscript

3. Array

4.ID

Posted Date:-2022-02-06 11:14:49


Question:
 If array is of String type all values are _________ by default.

1.null

2. Null

3. 0

4.Nothing

Posted Date:-2022-02-06 11:15:50


Question:
 In the following code, the body of If will execute if strFirst contains?

If strFirst.ToUpper Like "T[OI]M" Then

1.TIM

2.TM

3. IM

4.OM

Posted Date:-2022-02-06 11:04:09


Question:
 In the following code, the body of If will execute if txtState.Text contains?

If txtState.Text Like "K*" Then

1. K

2. K123

3.K4

4.4K

Posted Date:-2022-02-06 11:03:17


Question:
 In the following code, the while loop will execute if strId would have been ______

Do While strId Like "###*"

1.123ABC

2.Fgh2

3. Xzya

4.Xyza

Posted Date:-2022-02-06 11:02:53


Question:
 The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. The statement intSales(3) = intSales(3) + 10 will .

1.replace the 500 amount with 10

2.replace the 500 amount with 510

3.replace the 900 amount with 10

4.replace the 900 amount with 910

Posted Date:-2022-02-06 11:23:36


Question:
 The _______ method pads the string on left, that is, it inserts the padded characters at the beginning of string.

1.PadLeft

2.PadRight

3. PadFront

4.PadBegin

Posted Date:-2022-02-06 10:20:49


Question:
 The ________ argument in syntax of Contains method represents the sequence of arguments you are searching.

1. subString

2.SearchString

3. String

4.Seq

Posted Date:-2022-02-06 10:39:19


Question:
 Which of the following declares a five-element one-dimensional array?

1.Dim dblAmounts(4) As Double

2. Dim dblAmounts(5) As Double

3.Dim dblAmounts(4) As Double = {3.55, 6.70, 8, 4, 2.34}

4.Dim dblAmounts() As Double={3.55, 6.70, 8, 4, 2.34,1.45}

Posted Date:-2022-02-06 11:21:29


Question:
A simple variable, also called as a ________ variable, is one that is unrelated to any other variable in memory.

1.Changing

2.Dynamic

3. Static

4. Scalar

Posted Date:-2022-02-06 11:12:54


Question:
Each menu element is considered as _______

1.Class

2.Object

3.Instance

4.Member

Posted Date:-2022-02-06 11:07:33


Question:
Each menu item should have an _______ that is unique within its menu.

1. Access key

2.Property

3.Caption

4.Lists

Posted Date:-2022-02-06 11:11:41


Question:
Each menu title should have an unique __________

1.Access key

2.Property

3.Caption

4.Lists

Posted Date:-2022-02-06 11:10:53


Question:
Each of the options on the submenu are referred to as ________

1.Menu items

2.Submenu items

3.Submenu lists

4.Options

Posted Date:-2022-02-06 11:06:09


Question:
If the padCharacter is omitted from the syntax of the padLeft or PadRight, the default is ______

1.Space

2.*

3./

4. ?

Posted Date:-2022-02-06 10:20:21


Question:
In the following code, the body of If will execute if strFirst contains?

If strFirst.ToUpper Like "B?LL" Then

1.Bill

2.Lii

3.LL1

4. 123

Posted Date:-2022-02-06 11:03:42


Question:
The act of initializing array is also called as _______

1.Populating an array

2.Assigning array

3.Initializing

4.Factoring and array

Posted Date:-2022-02-06 11:16:41


Question:
The Contains Method returns ______________ value.

1.Integer

2.Void

3.Boolean

4.Strings

Posted Date:-2022-02-06 10:39:50


Question:
The Indexof method returns _________ value.

1. Integer

2.Boolean

3.Void

4.String

Posted Date:-2022-02-06 10:40:31


Question:
The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

1.Do While intSub < 4 intNums(intSub) = intTotal + intTotal intSub = intSub + 1 Loop dblAvg = intTotal / intSub

2.Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub

3.Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub − 1

4.Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / (intSub − 1)

Posted Date:-2022-02-06 11:29:26


Question:
The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. Which of the following If clauses determines whether the intSub variable contains a valid subscript for the array?

1.If intSales(intSub) >= 0 AndAlso intSales(intSub) < 4 Then

2.If intSales(intSub) >= 0 AndAlso intSales(intSub) <= 4 Then

3.If intSub >= 0 AndAlso intSub < 4 Then

4.If intSub >= 0 AndAlso intSub <= 4 Then

Posted Date:-2022-02-06 11:25:37


Question:
The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. Which of the following loops will correctly add 100 to each array element? The intSub variable contains the number 0 before the loops are processed.

1.Do While intSub <= 4 intSub = intSub + 100 Loop

2.Do While intSub <= 4 intSales = intSales + 100 Loop

3.Do While intSub < 5 intSales(intSub) =intSales(intSub) + 100 Loop

4.Do While intSub <6 intSales(intSub) = intSales(intSub) + 100 Loop

Posted Date:-2022-02-06 11:34:33


Question:
The Like operator returns _______________ value.

1.Integer

2.Boolean

3.String

4.Float

Posted Date:-2022-02-06 11:01:50


Question:
The list of items displayed by menu title are known as _______

1.Items

2.Menu list

3.Menu items

4.Lists

Posted Date:-2022-02-06 11:05:38


Question:
The programmer use _______ property to refer to menu element in code.

1. Text

2.Code

3.Name

4.Element

Posted Date:-2022-02-06 11:07:59


Question:
The strItems array is declared as follows: Dim strItems(20) As String. The intSub variable keeps track of the array subscripts and is initialized to 0. Which of the following Do clauses will process the loop instructions for each element in the array?

1.Do While intSub > 20

2.Do While intSub < 20

3.Do While intSub >= 20

4. Do While intSub <= 20

Posted Date:-2022-02-06 11:24:58


Question:
The ______ in a pattern represents one character only.

1.?

2. *

3. #

4. **

Posted Date:-2022-02-06 10:59:10


Question:
The ______ in a pattern represents zero or more characters.

1.?

2.*

3.#

4.**

Posted Date:-2022-02-06 10:59:45


Question:
The _______ in a pattern represents a single digit.

1.?

2.*

3. #

4. **

Posted Date:-2022-02-06 11:00:16


Question:
The _______ operator allows you to use pattern matching characters to determine whether one String is equal to another String.

1.Like

2. Pattern

3.Match

4.StringMatch

Posted Date:-2022-02-06 10:57:47


Question:
The ____________ indicates the purpose of the menu element.

1. Caption

2.Text

3.Name

4.Properties

Posted Date:-2022-02-06 11:09:00


Question:
To determine whether a string has specific sequence of characters, use _________

1.Contains method

2.Specific method

3.Sequence method

4.Check method

Posted Date:-2022-02-06 10:30:56


Question:
Using array in a program is efficient because ________

1.It shortens the program.

2. The program compiles faster

3.Number of variables are reduced.

4.Data is accessed faster

Posted Date:-2022-02-06 11:14:20


Question:
What is the result of the following statements?

Dim strCities() As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}
strCities(2)=”Kolkata”

1.Compilation Error

2.Runtime Error

3.strCity array is {“Bombay”, “Ladakh”, “Kolkata”,”Tamil Nadu”}

4. strCity array is {“Bombay”, “Chennai”,”Kolkata”, “Tamil Nadu”}

Posted Date:-2022-02-06 11:20:19


Question:
What is the value of len in the following Visual Basic code?

Dim strCities() As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}
Dim len As Integer
len = strCities.Length()

1. 4

2. 0

3. 3

4. 5

Posted Date:-2022-02-06 11:17:46


Question:
What is wrong with the following statement?

Dim strCities As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}

1. static keyword missing

2. array elements should be initialized using single quotes

3.array elements should be in square brackets

4. array name should be strCities()

Posted Date:-2022-02-06 11:18:45


Question:
What output will be returned if the following Visual Basic code is executed?

strCityState = "Nashville, TN"
blnIsContained = strCityState.Contains("TN")

1.True

2.False

3.11

4.12

Posted Date:-2022-02-06 10:41:04


Question:
What output will be returned if the following Visual Basic code is executed?

strCityState = "Nashville, TN"
intCharIndex = strCityState.IndexOf("TN")

1.True

2.False

3. 11

4.12

Posted Date:-2022-02-06 10:44:31


Question:
What output will be returned if the following Visual Basic code is executed?

strCityState = "Nashville, TN"
intCharIndex = strCityState.IndexOf("Tn")

1.True

2.False

3.11

4. -1

Posted Date:-2022-02-06 10:56:01


Question:
What will be assigned to the dblAvg variable after the code has been executed?

Do While intSub < 4
intTotal = intTotal + intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / (intSub − 1)
Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

1.0

2.5

3. 6

4.8

Posted Date:-2022-02-06 11:38:44


Question:
What will be assigned to the dblAvg variable after the code has been executed?

Do While intSub < 4
intTotal = intTotal + intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / intSub
Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

1. 0

2.5

3.6

4.8

Posted Date:-2022-02-06 11:36:46


Question:
What will be assigned to the dblAvg variable after the code has been executed?

Do While intSub < 4
intTotal = intTotal + intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / intSub – 1
Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

1.0

2.5

3.6

4.8

Posted Date:-2022-02-06 11:37:54


Question:
What will be assigned to the dblAvg variable after the code has been executed?
Do While intSub < 4
intNums(intSub) = intTotal + intTotal
intSub = intSub + 1
Loop
dblAvg = intTotal / intSub
Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

1.0

2.5

3.6

4.8

Posted Date:-2022-02-06 11:36:20


Question:
When you group together related variables, the group is referred to as _________

1.Array

2.List

3.Relation

4.Variable group

Posted Date:-2022-02-06 11:13:20


Question:
Which of the following expressions evaluates to True when the strPart variable contains the string “123X45”?

1.strPart Like “999[A-Z]99”

2. strPart Like “######”

3.strPart Like “###[A-Z]##”

4.strPart Like “##??##”

Posted Date:-2022-02-06 11:02:22


Question:
You use _______ to include one or more menus on a Windows form.

1.Menu control

2. Menu strip control

3.Form control

4.Menu properties

Posted Date:-2022-02-06 11:05:06


Question:
______ capitalization is used for menu item captions.

1.Book title

2.Sentence

3.Line

4.Title

Posted Date:-2022-02-06 11:09:51


Question:
______ method is used for accessing any number of characters in a String.

1.Substring

2.Contains

3. IndexOf

4.CharAt

Posted Date:-2022-02-06 10:56:26


Question:
_______ argument in the Substring syntax specifies number of characters you want to access.

1.numCharToAccess

2.CharAccess

3. numAccess

4. ToAccess

Posted Date:-2022-02-06 10:56:50


Question:
________ is used to visually group together related items on a menu or submenu.

1.Separator line

2.Separator bar

3.Line

4. Bar

Posted Date:-2022-02-06 11:07:08


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!