VB.Net MCQ Quiz Hub

VB.Net Mcq Question Set 6

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

1. Comparison operators are also termed as ______




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




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




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




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




6. ______ operator reverses the truth value of the operation.




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




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




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




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




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




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




13. 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




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




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




16. String comparison in Visual basic is case-sensitive.




17. ______ is used to converting a string to uppercase.




18. The __________ operator reverses the value of the condition.




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




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




21. 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




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




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




24. 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




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




26. Most common error that occur in selection structure is _____




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




28. 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




29. 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




30. 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




31. 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




32. 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




33. 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




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




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




36. 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




37. 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




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




39. The select case statement ends with ______




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




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




42. 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




43. 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




44. 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




45. _____ is used to add a GroupBox to the interface.




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




47. When you delete a groupbox the controls inside it are ______




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




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




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