VB.Net MCQ Quiz Hub

VB.Net Mcq Question Set 8

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

1. _________ in flowchart is used to represent a for clause.




2. How many times will the MessageBox.Show method in the following code be processed? For intNum As Integer = 5 To 1 Step -1 MessageBox.Show(“Hi”) Next intNum




3. What value is stored in the intNum variable when the loop ends? For intNum As Integer = 5 To 1 Step -1 MessageBox.Show(“Hi”) Next intNum




4. The ______ ensures that the computer processes any previous lines of code that affect the interface’s appearance.




5. To delay program execution, you can use the ______




6. A millisecond is ________ of a second.




7. Which of the following statements pauses program execution for 1 second?




8. What will the following code display in the lblSum control? Dim intSum As Integer Dim intY As Integer Do While intY < 3 For intX As Integer = 1 To 4 intSum = intSum + intX Next intX intY = intY + 1 Loop lblSum.Text = Convert.ToString(intSum)




9. A _______displays a list of choices.




10. The number of choices the user can select is controlled by the list box’s _______




11. The items in a list box belong to a collection called the ______




12. You specify each item to display in a list box using the Items collection’s________




13. Every variable has both a value and ______




14. Passing a copy of the variable is referred to as _________




15. Passing a variable’s address is referred to as __________




16. To pass a variable by value, you include the keyword ________________ before the name of its corresponding parameter.




17. The _____statement does not indicate whether a variable is passed by value or by reference.




18. The position of an item in a list box depends on the value stored in the list box’s _______




19. The items in a list box are sorted based on the ___________ characters in each item.




20. The ___________ keyword tells the computer to pass the variable’s address rather than its contents.




21. The items listed in the Call statement are referred to as _________




22. Which of the following is false?




23. ________ returns a value after performing its specific task.




24. The functions header and footer contains the _____ keyword.




25. A function’s header includes the ___________ data type.




26. A function can receive information either by value or by _________




27. Between the function’s _____________ and ___________________ you enter the instructions to process when the function is invoked.




28. ______ statement is the last statement in the function.




29. Each memory location listed in the parameterList in the procedure header is referred to as _______




30. To determine whether a variable is being passed to a procedure by value or by reference, you will need to examine ______




31. Which of the following is false?




32. Which of the following instructs a function to return the contents of the decStateTax variable?




33. Which property is used to specify a combo box’s style?




34. The items in a combo box belong to which collection?




35. Which of the following selects the Cat item, which appears third in the cboAnimal control?




36. The item that appears in the text portion of a combo box is stored in which property?




37. The _______________ event occurs when the user either types a value in the text portion of a combo box or selects a different item in the list portion.




38. A form’s _______ event is triggered when you click the Close button on its title bar.




39. A form’s ____________ event is triggered when the computer processes the Me.Close() statement.




40. Which of the following statements prevents a form from being closed?




41. Which of the following rounds the contents of the intNum variable to three decimal places?




42. A ______ allows you to select from a list of choices.




43. The number of characters contained in a String is stored as Integer in String’s ______




44. _______ method is used to remove space from beginning and end of a string.




45. _________ method is used to remove specified number of characters located anywhere in the String.




46. What will contain in txtFirst after the following Visual Basic code is executed? strName = "Penny Swanson" txtFirst.Text = strName.Remove(5)




47. What will be the value of num after the following Visual Basic code is executed? strName=”Veronica Yardley” num=strName.Length




48. ________ method allows you to insert anywhere in the string.




49. What will be in strName after the following code is executed? strName=”Joanne Hashen” strName=strName.Insert(7,”C.”);




50. __________ and ________ methods are used to align characters in a String.