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

Question:
 If the txtPrice control contains the value 75, what value will the Decimal.TryParse (txtPrice.Text,decPrice) method return?

1. False

2.True

3. 75

4.75.00


Question:
 If the txtPrice control contains the value 75, what value will the variable=Decimal.TryParse (txtPrice.Text,decPrice) method return?

1.False

2. True

3.75

4. 75.00


Question:
 Use __________ for the optional label entered in the groupbox’s text property.

1.Word capitalization

2.Sentence capitalization

3.Mixed capitalization

4.Row capitalization


Question:
 What is the result of the expression 10-2+20 ><2*25-2?

1.Syntax error

2.No resulting value found

3.False

4.True


Question:
A nested selection structure can be contained in ____________________ of another selected structure.

1.Only in the truth part

2.Only in the false part

3.Either in truth or in false part

4.Both in truth and in false part


Question:
And operator checks both the sub-conditions whereas AndAlso operator does ____

1. Short-circuit evaluation

2.Short-hand evaluation

3.Short evaluation

4.Circuit evaluation


Question:
And operator checks both the sub-conditions whereas OrElse operator does ____

1. Short-circuit evaluation

2. Short-hand evaluation

3.Short evaluation

4.Circuit evaluation


Question:
Comparison operators are also termed as ______

1.Comparators

2. Comparables

3.Relations

4.Relational operators


Question:
In the below statement when true is returned?

If str=”USE” Xor strln=”USE” Then

1.When both the sub-conditions are true

2. When only one sub-condition is true

3.When both the sub-conditions are false

4. It never returns true


Question:
In the following Visual Basic code, what will be in msg, if str contains “ik”?

Dim str as String
Dim  msg as String
If str.toUpper=”IK” 
   msg=”Hi”
Else
   msg=”Bye”
EndIf

1.Hi

2. Bye

3.Compiler Error

4.Logical Error


Question:
Most common error that occur in selection structure is _____

1.Logical error

2.Syntactical error

3.Segmentation fault

4.Compiler Error


Question:
Selection structures that can select from many alternatives are known as ______

1.Selection structures

2.Multiple-alternative selection structures

3.Multiway selection structures

4.Multipath selection structures


Question:
String comparison in Visual basic is case-sensitive.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
The select case statement ends with ______

1.Select End clause

2.End Select clause

3.End clause

4.Select clause


Question:
The __________ method creates a periodic payment on either a loan or an investment.

1.Financial

2.Pmt

3. Financial.Pmt

4.Calculate


Question:
The __________ operator reverses the value of the condition.

1.AND

2.OR

3.NOT

4.NAND


Question:
What is the comparison operator to find if two values are equal?

1.equalsto

2.=

3. EqualsTo

4.Equals


Question:
What is the result of the expression 10-2+20>2*14-2?

1. Syntax error

2. No resulting value found

3.False

4.True


Question:
What is the result of the expression 10-5>3*4-2?

1.Syntax error

2.No resulting value found

3. False

4. True


Question:
What will be contained in Msg if grade entered by user is ‘d’?

If grade==”A”
    Msg =”Excellent”
ElseIf grade==”B”
    Msg=”Very Good”
ElseIf  grade==”C”
    Msg=”Good”
ElseIf grade==”D”
    Msg=”Fair”
Else
    Msg=”Fail”
EndIf

1.Fair

2.Fail

3.Good

4.Excellent


Question:
What will be contained in Msg if grade entered by user is ‘d’?
grade=grade.Text.ToUpper
If grade==”A”
  Msg =”Excellent”
ElseIf grade==”B”
  Msg=”Very Good”
ElseIf  grade==”C”
  Msg=”Good”
ElseIf grade==”D”
  Msg=”Fair”
Else
  Msg=”Fail”
EndIf

1.Fair

2.Fail

3.Good

4.Excellent


Question:
What will be in Msg after the following code is evaluated?

If 3>6 AndAlso 7>4 then
   Msg=”Hi”
Else
   Msg=”Bye”
EndIf

1. Hi

2. Bye

3.True

4.False, False


Question:
What will be in Msg after the following code is evaluated?

If 5*3 OrElse 3^2 Then
   Msg=”Hi”
Else
   Msg=”Bye”
EndIf

1.Hi

2.Bye

3. True

4.False, False


Question:
What will be in Msg after the following code is evaluated?

If 5*3>3^2 AndAlso True OrElse False Then
Msg=”Hi”
Else
Msg=”Bye”
Endif

1.Hi

2.Bye

3.True

4. false


Question:
What will be in text, if Intid contains 2?

Select Case Intid
Case 1
  Text=”Jannet”
Case 2 to 4
  Text=”Mark”
Case 5, 7
  Text=”Jerry”
Case Else
  Text=”Sue”
End Select

1. Jannet

2.Mark

3. Jerry

4.Sue


Question:
What will be in text, if Intid contains 3?

Select Case Intid
Case 1
  Text=”Jannet”
Case 2 to 4
  Text=”Mark”
Case 5, 7
  Text=”Jerry”
Case Else
  Text=”Sue”
End Select

1.Jannet

2.Mark

3. Jerry

4.Sue


Question:
What will be in text, if Intid contains 6?

Select Case Intid
Case 1
  Text=”Jannet”
Case 2 to 4
  Text=”Mark”
Case 5, 7
  Text=”Jerry”
Case Else
  Text=”Sue”
End Select

1. Jannet

2. Mark c) Jerry

3. Jerry

4.Sue


Question:
What will be the content of num, after code execution; if before code execution num has value 1000?

If num<=100
    num=num*2;
ElseIf num>500
   Num=num*3;
Endif

1.0

2.1000

3. 3000

4.2000


Question:
What will be the content of num, after code execution; if before code execution num has value 200?

If num<=100
    num=num*2;
ElseIf num>500
   Num=num*3;
Endif

1.0

2. 200

3. 400

4.600


Question:
What will be the content of num, after the code execution; if before code execution num has value 90?

If num<=100
    num=num*2;
ElseIf num>500
   Num=num*3;
Endif

1. 0

2.90

3.180

4.270


Question:
What will be the content of Text after the code is executed with id=2?

If id==1 Then
    Text=”Janet”;
Elseif id==2 OrElse id==3 Then
   Text=”Mark”
ElseIF id==4 Then
    Text=”Jerry”
Else
  Text=”Sue “;
EndIf

1. Janet

2.Mark

3. Jerry

4.Sue


Question:
What will be the content of Text after the code is executed with id=4?

If id==1 Then
    Text=”Janet”;
Elseif id==2 OrElse id==3 Then
   Text=”Mark”
ElseIF id==4 Then
    Text=”Jerry”
Else
  Text=”Sue “;
EndIf

1. Janet

2.Mark

3. Jerry

4.Sue


Question:
What will be the content of Text after the code is executed with id=8?

If id==1 Then
    Text=”Janet”;
Elseif id==2 OrElse id==3 Then
   Text=”Mark”
ElseIF id==4 Then
    Text=”Jerry”
Else
  Text=”Sue “;
EndIf

1. Janet

2. Mark

3. Jerry

4.Sue


Question:
What will be the output of the following Visual Basic code, If the intnumber variable is 90?

If intnumber<=100 Then
   Intnumber=intnumber*2;
Else
   Intnumber=intnumber*3;
EndIf

1.156

2.234

3.180

4.270


Question:
What will be the output of the following Visual Basic expression?

-Financial.Pmt (0.06/12, 5*12, 12000)

1.200

2.231.99

3.345

4.324.99


Question:
When a selection structure’s true part or false part contains another selection structure, the inner selection structured is referred to as ___

1.Implicit selection structure

2.Inner selection structure

3.Outer selection structure

4.Nested selection structure


Question:
When you delete a groupbox the controls inside it are ______

1.Retained

2.Given to another groupbox

3.Data loss occurs

4.Deleted


Question:
Which is an easier alternative of multiple-alternative selection structure?

1. Single-alternative selection structure

2.Multipath selection structure

3.Select case Statement

4.Multiway-alternative selection structure


Question:
Which is used to check both the conditions in a given if statement?

1.OrElse

2.AndAlso

3.NOT

4.OR


Question:
Which is used to check one among both the conditions in a given if statement?

1.OrElse

2.AndAlso

3.NOT

4.OR


Question:
Which logical operator does not allow us to combine two or more conditions?

1.AND

2.OR

3.NOT

4.NAND


Question:
Which of the following Case clauses is invalid in a Select Case statement whose selectorExpression is an Integer variable named intCode?

1.Case Is>7

2.Case 3,5

3.Case 1 to 4

4.Case “A”


Question:
____ operator returns true, if any of the sub-condition is true.

1.AND

2. OR

3.NOT

4.NAND


Question:
_____ is used to add a GroupBox to the interface.

1.GroupBox tool

2.Group tool

3.Properties Window

4. View Window


Question:
______ is used to converting a string to uppercase.

1.toUpper

2.toLower

3.toUpperCase

4. toLowerCase


Question:
______ is used to separate related controls from other controls in the form.

1.GroupBox

2.GroupBox tool

3.View Window

4.Groups


Question:
______ operator reverses the truth value of the operation.

1. AND

2.OR

3.NOT

4.NAND


Question:
______ refers to the process of checking your algorithm while seated at your desk.

1.Disk-checking

2.Desk-checking

3. Drive-checking

4.Paper-checking


Question:
_______ operator returns true, if all the sub-conditions are true.

1.AND

2. OR

3.NOT

4.NAND


Question:
________ must be the last clause in the Select Case statement.

1.Case Else

2.Case expnumber

3. Case seletorExpression

4.Case default


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!