Mark the correct answer on your Scantron sheet for each of the following questions.

1.  In the context of OOP, each tool in the toolbox is a(n) ____, a pattern from which one or more objects are created. B

a.  instance b. class c. module d. abstraction

2.  When you place a label control on the form, its default ____ property is the same as its Caption property. D

a.  AutoName b. Title c. Label d. Name

3.  The location of an object on a form is measured in ____ from the edges of the form. A

a.  twips b. points c. bytes d. picas

4.  To size the picture in an image control, set the image control's ____ property to True. D

a.  ImageSize b. Picture c. PictureSize d. Stretch

5.  You can see what other event procedures an object can recognize by clicking the list arrow in the D

a.  Action window's Object box. b. Action window's Procedure box. c. Code window's Object box.

d. Code window's Procedure box.

6.  English-like statements that represent the steps an object needs to take in order to perform a task are called A

a.  pseudocode. b. directions. c. instructions. d. guides.

7.  Related controls should be grouped together using a D

a.  box. b. circle. c. screen object. d. frame.

8.  When a label control's BackStyle property is set to 1-____, the color value stored in the control's BackColor property fills the control and obscures any color behind it. B

a.  hidden b. opaque c. solid d. transparent

9.  The period between form and object in an assignment statement, as well as the period between object and property, is called the A

a.  dot member selection operator. b. period operator. c. class operator. d. member operator.

10.  You can use the ____ method to set the focus to a form or a control while the application is running. D

a.  ControlFocus b. Focus c. Control d. SetFocus

11.  A zero-length string is also called a(n) ____ string. A

a.  empty b. no-length c. open d. small set

12.  A floating-point number is a number that is expressed as a multiple of some power B

a.  1. b. 10. c. 100. d. 2.

13.  The Dim statement initializes integer type variables to B

a.  null (""). b. 0 (zero). c. 1 (one). d. 2.

14.  You enter the Option Explicit statement in the form's C

a.  event procedure. b. click event. c. general declarations section. d. load event.

15.  You use the ____ statement in the General Declarations section of a code module to create or declare a global variable. D

a.  Create b. Declare c. Dim d. Public

16.  Global symbolic constants are declared in B

a.  an event procedure. b. the General Declarations section of a code module.

c. the General Declarations section of a form. d. Any of the above

17.  A ____ form is a form that does not require the user to take any action before the focus can switch to another form or dialog box, or before subsequent code is executed. C

a.  constant b. modal c. modeless d. static

18.  Which of the following will center the frmInput form horizontally on the screen? D

a.  frmInput.Left = Screen.Width - frmInput.Width / 2 b. frmInput.Width = Screen.Left - frmInput.Left / 2

c. frmInput.Left = (frmInput.Width - Screen.Width) / 2 d. None of the above

19.  The ____ structure refers to the fact that the computer can evaluate a condition and then select the appropriate tasks to perform based on that evaluation. A

a.  selection b. repetition c. evaluation d. looping

20.  If the condition in a selection structure evaluates to false, which instructions will be processed next? D

a.  The set of instructions between the Else and the End If, if there is an Else

b.  The set of instructions between the Then and the Else, if there is an Else

c.  The set of instructions following the End If instruction, if there is no Else

d.  Either A or C

21.  Mathematical operators are evaluated ____ the relational operators. C

a.  after b. at the same time as c. before d. None of the above

22.  In what order will the operators in the expression 7 - 3 < 9 + 8 / 2 * 2 be evaluated? C

a.  -, <, +, /, * b. -, +, /, *, < c. /, *, -, +, < d. /,*,+,-,<

23.  And, Not, and Or are examples of ____ operators. B

a.  comparison b. logical c. mathematical d. relational

24.  Which of the following will collect a shipping charge on all New York sales that are over $2000? B

a.  UCase(strState) = NEW YORK And curSales > 2000

b.  UCase(strState) = "NEW YORK" And curSales > 2000

c. UCase(strState) = "NEW YORK" And curSales > "2000"

d. UCase(strState) = "NEW YORK" Or curSales > 2000

25.  The ____ operator reverses the value of a condition. B

a.  and b. not c. or d. Both A and B

26.  If the value of A is false and the value of B is true, then the value of A and B is C

a.  can't be determined with the information provided. b. either true or false. c. false. d. true.

27.  If the value of A is false, the value of B is true, and the value of C is false, then the value of A and B or C is B

a.  true. b. false. c. Either A or B d. None of the above

28.  Because only one of the conditions combined with the ____ operator needs to be True for the compound condition to be True, there is no need to evaluate the second condition if the first condition is True. A

a.  or b. not c. and d. None of the above

29.  In the Select Case statement, if the test expression does not match any of the values in any of the expressionlists, Visual Basic will process the instructions D

a.  in the Case Else clause, if there is a Case Else clause. b. in the last Case clause, if there is no Case Else clause.

c. located after the End Select clause, if there is no Case Else clause. d. Either A or C

30.  Which of the following Case clauses could be used with the Select Case UCase(txtData.Text) clause? D

a.  Case "A" b. Case "V","X" c. Case UCase("p") d. All of the above

31.  Use a(n) ____ control in situations where you want to limit the user to only one of two or more related and mutually exclusive choices. C

a.  check box b. command button c. option button d. text box

32.  Which of the following will generate random integers from 1 through 20? B

a.  Int((1 - 20 + 1) * Rnd + 20) b. Int((20 - 1 + 1) * Rnd + 1) c. Int((20 - 1 + 1)) * Rnd + 1

d. Int((20 + 1 - 1)) * Rnd + 1

33.  You use the ____ statement to invoke a user-defined sub procedure. A

a.  call b. invoke c. send d. transfer

34.  A local variable that retains its value when a procedure ends is called a(n) ____ variable. B

a.  constant b. static c. symbolic d. unchangeable

35.  Assume that the insertion point is in the first position of a text box named txtItem. Which of the following will highlight all of the characters in the text box? C

a.  txtItem.BeginSel = Len(txtItem.Text) b. txtItem.BeginText = Len(txtItem.Text)

c. txtItem.SelLength = Len(txtItem.Text) d. txtItem.SelStart = Len(txtItem.Text)

36.  Programmers use the ____ structure to tell the computer to repeat one or more instructions contained in a program. A

a.  repetition b. selection c. iteration d. recurrence

37.  Which of the following For instructions is valid? D

a.  For intNum = 1 to 4 b. For intNum = 1 to 5 Step 1 c. For intX = .5 to 1.25 Step .25 d. All of the above

38.  How many times will the instruction within the following For Next loop be processed? C

For intX = 1 to 5 Step 1 Print intX Next intX

a.  1 b. 4 c. 5 d. 6

39.  If a stepvalue is positive in a For Next loop, then the ____ must be less than or equal to the ____ for the loop instructions to be processed. C

a.  endvalue, startvalue b. endvalue, stepvalue c. startvalue, endvalue d. startvalue, stepvalue

40.  What will be the value of intX when the following For Next loop stops processing? B

For intX = 3 to 1 Step -.5 Print intX Next intX

a.  -.5 b. .5 c. 1 d. 2.5

41.  When you don't know precisely how many times loop instructions should be repeated, which repetition structure can you use? A

a.  Do Until b. For While c. For Next d. None of the above

42.  The Do While loop evaluates the condition ____ processing any of the instructions within the loop. A

a.  before b. after c. while d. None of the above

43.  Which of the following is a pretest loop? B

a.  Do Until b. Do While c. For Until d. Both B and C

44.  What numbers will print on the form when the following code is processed? A

intX = 1 Do While inX < 3 Print intX intX = intX + 1 Loop

a.  1, 2 b. 1, 2, 3 c. 1, 2, 3, 4 d. No numbers will print on the form.

45.  What numbers will print on the form when the following code is processed? D

intX = 4 Do While intX > 2 Print intX intX = intX - 1 Loop

a.  1, 2, 3, 4 b. 2, 3, 4 c. 4, 3, 2 d. 4, 3

46.  In the following code, how many times will the first Inputbox statement be processed? B

strEmpName = InputBox("Enter the employee's name")

Do While UCase(strEmpName)> "DONE"

Print strEmpName

strEmpName = InputBox("Enter the employee's name")

Loop

a.  0 b. 1 c. As many times as there are employees d. You can't tell from the information provided.

47.  Which of the following is true about accumulators? A

a.  Accumulators are usually initialized to 0 (zero). b. Accumulators are incremented by a constant value.

c. Accumulators are updated after the loop stops. d. All of the above

48.  Which of the following will initialize the curTotSales accumulator to 0 (zero)? D

a.  Dim curTotSales as Currency b. Dim curTotSales = 0 c. curTotSales = 0 d. Both A and C

49.  The unique number that is assigned to each control in a control array is stored in each control's ____ property. C

a.  ArrayNum b. ControlNum c. Index d. Name

50.  The items inside the parentheses following the name of an event procedure are called A

a.  arguments. b. arrays. c. controls. d. sub procedures.

51.  List box items can be D

a.  arranged by use, with the most used entries appearing first in the list. b. sorted in ascending order.

c. automatically sorted if the list box’s sorted property is set to True. d. All of the above

52.  Which of the following will add the word Idaho to a list box named lstState? B

a.  lstState.Add "Idaho" b. lstState.AddItem "Idaho" c. lstState.AddList "Idaho" d. lstState.ItemAdd "Idaho"

53.  The three types of data files in Visual Basic are A

a.  binary, sequential, random. b. binary, selection, sequential. c. random, selection, sequential.

d. random, repetition, sequential.

54.  Opening a sequential access file for ____ allows you to add data to the end of an existing sequential access file. B

a.  add b. append c. include d. input

55.  Which of the following will stop the loop when there are no more records in the file opened as #1? C

a.  Do While EOF>1 b. Do While EOF Not(1) c. Do While Not EOF(1) .d None of the above

56.  When the record pointer is at the end of a file, the EOF function returns A

a.  the Boolean value True. b. the Boolean value False. c. the String "EOF". d. the String "True".

57.  You can use the ____ function to extract one or more characters from the right side of a string. D

a.  IsNumeric b. Right c. Mid d. Both B and C

58.  If the txtCity text box contains the string, New York City, ____ will return York. D

a.  Left(txtCity, 5, 4) b. Left(txtCity, 4) c. Mid(txtCity, 4, 4) d. Mid(txtCity, 5, 4)

59.  If the strEmpName variable contains the name Paul Drakson, the Right(strEmpName, 4) instruction is C

a.  Mid(strEmpName, 1, 4). b. Mid(strEmpName, 4, 9). c. Mid(strEmpName, 9, 4). d. Mid(strEmpName, 4, 10.)

60.  The instruction Instr(4, “Be sure to vote.”, “Vote”, 0) will return A

a.  0. b. 8. c. 9. d. 12.

61.  Which of the following statements about the Common Dialog control is true? C

a.  It never displays as an icon on the form. b. You can resize its icon, if necessary. c. None of the above

d. All of the above

62.  The syntax of the On Error statement is A

a.  On Error GoTo line. b. On Error line. c. On Error GoTo. d. None of the above

63.  Name in the syntax of the Call statement can be C

a.  user defined procedure. b. the name of an event procedure. c. both A and B d. None of the above

64.  Setting the Cancel argument in a form's Unload event procedure to a nonzero value C

a.  uncancels the Unload event. b. allows the form to be unloaded. c. cancels the Unload event. d. Both A and C

65.  Random access files are generally not used for D