VB.Net MCQ Quiz Hub

VB.Net Mcq Question Set 5

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

1. When you declare a variable in the form’s declaration section, it is called as _______




2. Lifetime of a class-level variable is till _______




3. A class-level variable is declared using ______________ keyword.




4. A procedure-level variable is declared using ____________ keyword.




5. Two procedures can have procedure-level variable whose names are same.




6. _____ is a variable that remains in memory, and retains its value even after the procedure declaring it ends.




7. Static variable can only be used in the __________ in which it is declared.




8. A __________ cannot change its value while the application is running.




9. Named constants are used because ______




10. What is wrong with the expression “const dblPi As Double = 3.141593”?




11. What is wrong with the expression “static dblPi AsDouble ”?




12. What happens when a procedure containing the following statements ends? Dim decSales As Decimal=12.2 Static decTotal As Decimal=13.5




13. Using a named constant is advantageous because to change a value in future, change ______




14. Unintentional errors in application by declaring variables can be reduced by ____




15. To declare a class-level named constant you declare it as __________




16. In Visual Basic, if you keep a variable undeclared, it is automatically taken as___________ data type.




17. ______ prevents you from using undeclared variable in your code.




18. ______ ensures every variable and named constant is declared with a data type.




19. ______ is used to fit the value of the data type to that of the memory location, implicitly.




20. When a value is converted from one data type to another and can store numbers with greater precision, the value is said to be ___




21. When a value is converted from one data type to another and can store numbers with less precision, the value is said to be ____




22. You can eliminate the problems of implicit type conversion, with the help of ______




23. Option Strict On disallows conversion of String data type to __________ implicitly.




24. Option Strict On disallows conversion of Double data type to __________ implicitly.




25. Instead of entering the Option statements in the Code Editor window, you also can enter in the _____




26. The __________ is used to concat to Strings.




27. Specifying the number of decimal places and special characters to display in a number is called as ____




28. ____ function is used to format numbers.




29. The toString method formats the number stored in the numeric value and then returns the result as a _____




30. ________ in the syntax gives the format you want to use.




31. ____ displays an input dialog box containing a message, Ok and Cancel button and an input area.




32. ______ is an underscore that is immediately preceded by a space and is located at the end of the physical line of code.




33. The InputBox functions prompt argument should be entered using _____




34. The value returned by the Inputbox depends on the __________ the user chooses.




35. The __________ argument contains the message to display inside the dialog box.




36. The __________ constant instructs the computer to advance the insertion point to the next line in control.




37. ______ can be used to advance the insertion point in a file or on the printer.




38. Which of the following is called the line continuation character?




39. ControlChars.NewLine constant is a __________ constant.




40. What is wrong with the below statement?Msg.Text=”This is an example”&ControlChars.NewLine&“Example”.




41. What is the specialty of the Default button?




42. The Cancel Button’s procedure is accessed by __________ key.




43. How many default buttons can a form have?




44. How is a default button designated?




45. What is the correct syntax to designate a default button?




46. In Visual Basic __________ is used for coding single-alternative and dual-alternative selection structures.




47. The __________ keyword is necessary only in a dual-alternative selection structure.




48. The condition must be a __________ expression.




49. The set of statements contained in each path is referred to as a _____




50. What is wrong with the following if-else structure? If intQuantity > 5 Then dblDiscountRate = .1 Else dblDiscountRate = .05 End If