VB.Net MCQ Quiz Hub

VB.Net Mcq Question Set 6

Choose a topic to test your knowledge and improve your VB.Net skills

Comparison operators are also termed as ______





✅ Correct Answer: 4

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





✅ Correct Answer: 2

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





✅ Correct Answer: 3

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





✅ Correct Answer: 4

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





✅ Correct Answer: 1

______ operator reverses the truth value of the operation.





✅ Correct Answer: 3

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





✅ Correct Answer: 1

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





✅ Correct Answer: 2

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





✅ Correct Answer: 1

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





✅ Correct Answer: 1

In the below statement when true is returned? If str=”USE” Xor strln=”USE” Then





✅ Correct Answer: 2

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





✅ Correct Answer: 3

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





✅ Correct Answer: 1

What will be in Msg after the following code is evaluated? If 3>6 AndAlso 7>4 then Msg=”Hi” Else Msg=”Bye” EndIf





✅ Correct Answer: 2

What will be in Msg after the following code is evaluated? If 5*3 OrElse 3^2 Then Msg=”Hi” Else Msg=”Bye” EndIf





✅ Correct Answer: 1

String comparison in Visual basic is case-sensitive.





✅ Correct Answer: 1

______ is used to converting a string to uppercase.





✅ Correct Answer: 1

The __________ operator reverses the value of the condition.





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 4

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





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 1

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





✅ Correct Answer: 1

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





✅ Correct Answer: 4

Most common error that occur in selection structure is _____





✅ Correct Answer: 1

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





✅ Correct Answer: 1

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





✅ Correct Answer: 3

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





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 2

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





✅ Correct Answer: 3

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





✅ Correct Answer: 4

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





✅ Correct Answer: 4

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





✅ Correct Answer: 2

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





✅ Correct Answer: 2

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





✅ Correct Answer: 1

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





✅ Correct Answer: 3

The select case statement ends with ______





✅ Correct Answer: 2

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





✅ Correct Answer: 4

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





✅ Correct Answer: 1

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





✅ Correct Answer: 2

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





✅ Correct Answer: 2

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





✅ Correct Answer: 4

_____ is used to add a GroupBox to the interface.





✅ Correct Answer: 1

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





✅ Correct Answer: 1

When you delete a groupbox the controls inside it are ______





✅ Correct Answer: 4

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





✅ Correct Answer: 2

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





✅ Correct Answer: 3

What will be the output of the following Visual Basic expression? -Financial.Pmt (0.06/12, 5*12, 12000)





✅ Correct Answer: 2