Quiznetik

Dot Net Architecture and Program | Set 1

1. The Visual Basic Code Editor will automatically detect certain types of errors as you are entering code.

Correct : A. true

2. Keywords are also referred to as reserved words.

Correct : A. true

3. The divide-and-conquer-method of problem solving breaks a problem into large, general pieces first, then refines each piece until the problem is manageable.

Correct : A. true

4. Visual Basic responds to events using which of the following?

Correct : B. an event procedure

5. When the user clicks a button, _________ is triggered.

Correct : A. an event

6. What property of controls tells the order they receive the focus when the tab key is pressed during run time?

Correct : C. tab index

7. Sizing Handles make it very easy to resize virtually any control when developing applications with Visual Basic. When working in the Form Designer, how are these sizing handles displayed?

Correct : C. a rectangle with small squares around your control.

8. The Properties window plays an important role in the development of Visual Basic applications. It is mainly used

Correct : A. to change how objects look and feel.

9. When creating a new application in Visual Basic, you are asked to supply a name for the program. If you do not specify a name, a default name is XXXXX XXXXX is this default name?

Correct : B. application followed by a number.

10. Which of the properties in a control’s list of properties is used to give the control a meaningful name?

Correct : D. name

11. An algorithm is defined as:

Correct : C. a logical sequence of steps that solve a problem.

12. A variable declared inside an event procedure is said to have local scope

Correct : A. true

13. A variable declared outside of an event procedure is said to have class-level scope.

Correct : A. true

14. Option Explicit requires you to declare every variable before its use.

Correct : A. true

15. The value returned by InputBox is a string.

Correct : A. true

16. What is the correct statement when declaring and assigning the value of 100 to an Integer variable called numPeople

Correct : D. dim numpeople as integer = 100

17. Which of the following arithmetic operations has the highest level of precedence?

Correct : C. ^ exponentiation

18. What value will be assigned to the numeric variable x when the following statement is executed? x = 2 + 3 * 4

Correct : B. 14

19. Which of the following is a valid name for a variable?

Correct : A. two_one

20. Keywords in Visual Basic are words that

Correct : C. have special meaning and should not be used when naming variables.

21. To continue a long statement on another line, use:

Correct : A. an underscore character.

22. What is the proper syntax when using a message dialog box?

Correct : A. messagebox.show(“hi there”, “hi”)

23. What will be the output of the following statement? txtBox.Text = FormatCurrency(1234.567)

Correct : D. $1,234.57

24. The following lines of code are correct. If age >= 13 And < 20 Then txtOutput.Text = “You are a teenager.” End If

Correct : B. false

25. Given that x = 7, y = 2, and z = 4, the following If block will display “TRUE”. If (x > y) Or (y > z) Then txtBox.Text = “TRUE” End If

Correct : A. true

26. Asc(“A”) is 65. What is Asc(“C”)?

Correct : B. 67

27. Asc(“A”) is 65. What is displayed by txtBox.Text = Chr(65) & “BC”?

Correct : A. abc

28. Which of the following expressions has as its value the words “Hello World? surrounded by quotation marks?

Correct : A. “hello world”

29. Which of the following is true?

Correct : B. “cat” < “cat”

30. Which of the following is a valid Visual Basic conditional statement?

Correct : D. (2 < n) or (n < 5)

31. The three main logical operators are ________, _________, and ________.

Correct : A. and, or, not

32. Which value for x would make the following condition true: x >= 5

Correct : D. all of the above

33. Which value for x would make the following condition true: Not (x >= 5)

Correct : B. x is equal to 4

34. Which value for x would make the following condition true: (x >= 5) And (x <= 6)

Correct : C. x is equal to 5.001

35. Constructs in which an If block is contained inside another If block are called:

Correct : B. nested if blocks

36. One may use an If block within a Select Case block.

Correct : A. true

37. One may use a Select Case block within an If block.

Correct : A. true

38. Select Case choices are determined by the value of an expression called a selector.

Correct : A. true

39. Items in the value list must evaluate to a literal of the same type as the selector

Correct : A. true

40. A single Case statement can contain multiple values.

Correct : A. true

41. You can specify a range of values in a Case clause by using the To keyword.

Correct : A. true

42. A variable declared inside a Select Case block cannot be referred to by code outside of the block.

Correct : A. true

43. Suppose that the selector in a Select Case block is the string variable myVar. Which of the following is NOT a valid Case clause?

Correct : D. case myvar.length

44. Different items appearing in the same value list of a Select Case block must be separated by a ____________.

Correct : B. comma

45. Which Case clause will be true whenever the value of the selector in a Select Case block is between 1 and 5 or is 8?

Correct : B. case 1 to 5, 8

46. Which Case clause will be true whenever the value of the selector in a Select Case block is greater than or equal to 7?

Correct : C. case is >= 7

47. What type of items are valid for use in the value list of a Case clause?

Correct : D. all of the above

48. What happens to a variable declared locally inside a Sub procedure after the procedure terminates?

Correct : B. it ceases to exist after the end sub statement executes.

49. Suppose a variable is passed by reference to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?

Correct : A. it will have the newly modified value from inside the sub procedure.

50. Suppose a variable is passed by value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?

Correct : C. it will retain the value it had before the call to the sub procedure

51. The declaration statement for a class-level variable should be placed __________.

Correct : C. anywhere in the program region, except inside a procedure

52. Variables declared inside a procedure are said to have ________________.

Correct : A. local scope

53. Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?

Correct : D. the two variables will be local to their respective sub procedures.

54. Which of the following statements is guaranteed to pass the variable numVar by value to the Sub procedure Tally?

Correct : D. tally(byval numvar as double)

55. The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.

Correct : C. parameters

56. Which of the following is NOT a reason for using procedures?

Correct : B. they make a program run faster.

57. Which one of the following is true about arguments and parameters?

Correct : A. arguments appear in call statements; parameters appear in sub statements.

58. Each individual variable in the list student(0), student(1), student(2) is known as a(n)

Correct : C. element

59. The statement Const TAX_RATE As Doubleface=Calibri size=2> is not valid.

Correct : A. true

60. Function names should be suggestive of the role performed. The names also must conform to the rules for naming variables.

Correct : A. true

61. The input to a user-defined function can consist of one or more values.

Correct : A. true

62. Both the input and output of a Function procedure can consist of several values.

Correct : B. false

63. Suppose you want to write a procedure that takes three numbers, num1, num2, and num3; and returns their sum, product, and average. It is best to use a Function procedure for this task.

Correct : B. false

64. Although a function can return a value, it cannot directly display information in a text box.

Correct : B. false

65. Function procedures can invoke other Function procedures.

Correct : A. true

66. A Function may return up to two values.

Correct : B. false

67. The input to a user-defined function can consist of:

Correct : D. all of the above

68. Variables appearing in the header of a Function procedure are called ____________.

Correct : B. parameters

69. The arguments appearing in a Call statement must match the parameters in the appropriate Sub or Function header in all but one of the following ways. Which one?

Correct : B. names of arguments

70. A Do While loop checks the While condition before executing the statements in the loop.

Correct : A. true

71. A Do?Loop Until block is always executed at least once

Correct : A. true

72. A counter variable is normally incremented or decremented by 1.

Correct : A. true

73. The value of the control variable should not be altered within the body of a For?Next loop.

Correct : B. false

74. The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are.

Correct : B. false

75. The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are. duplicate question?

Correct : B. false