FBLA Visual Basic Programming 2003 District

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

1.  The set of characteristics that control an object's appearance and behavior is called C

a.  attributes.

b.  fonts.

c.  properties.

d.  states.

2.  The ____ in the properties window displays the current value of the selected property. C

a.  form

b.  object box

c.  settings box

d.  toolbar

3.  When you click the list arrow for a property in the settings box, A

a.  a list or a color palette will appear containing the valid predefined settings for the selected property.

b.  a dialog box will appear.

c.  nothing will happen because the selected property does not have any predefined settings.

d.  the selected property's value will change to the next valid setting.

4.  When writing Visual Basic code, you use the object's ____ to refer to the object. C

a.  caption

b.  file name

c.  name

d.  text

5.  The ____ control displays text that you don't want the user to modify. C

a.  caption

b.  display

c.  label

d.  name

6.  When an image control's ____ property is set to True, the picture within the image control will size along with the control. A

a.  stretch

b.  expand

c.  length

d.  width

7.  Command buttons in an interface should be ____ of the screen. D

a.  centered along the top

b.  stacked in the lower-left corner

c.  either stacked in the upper-left corner or centered along the bottom

d.  either stacked in the upper-right or lower-right corner or centered along the bottom

13

FBLA Visual Basic Programming 2003 District

8.  The most important information in an interface should be located in the ____ corner. C

a.  lower-left

b.  lower-right

c.  upper-left

d.  upper-right

9.  Command button captions should be D

a.  on one line.

b.  from one to three words only.

c.  entered in book title capitalization.

d.  All of the above.

10.  The ____ key moves the focus from one control to another. C

a.  alt

b.  ctrl

c.  tab

d.  enter

11.  Visual Basic ignores the setting in the control's BackColor property when the property is set to 0- D

a.  Clear.

b.  Obscure.

c.  Hidden.

d.  Transparent.

12.  A control’s ____ property determines if a control appears flat or three-dimensional. C

a.  BackStyle

b.  Dimension

c.  Appearance

d.  Type

13.  The ____ property determines the order in which a control receives the focus when the user is tabbing. D

a.  ControlTab

b.  Focus

c.  TabFocus

d.  TabIndex

14.  You can assign an access key to any control that has a(n) ____ property. B

a.  Access

b.  Access Key

c.  Caption

d.  Key

15.  Which of the following is false? B

a.  Access keys must be unique.

b.  Access keys appear as bold letters.

c.  If possible, use the first letter of the caption as the access key.

d.  You can use a label control to provide keyboard access to a text box.

16.  You can use the ____ function to tell Visual Basic to treat a character string as a number. D

a.  Null

b.  Num

c.  Str

d.  Val

17.  You can verify the names of controls while you are writing Visual Basic code by using the Code window's C

a.  form box.

b.  toolbox.

c.  object box.

d.  project box.

18.  When you enter an instruction that is syntactically correct but that does not give you correct results, you have created a ____ error. C

a.  format

b.  debug

c.  logic

d.  None of the above

19.  Memory locations whose value can change as the program is running are called D

a.  constants.

b.  globals.

c.  memory boxes.

d.  variables.

20.  A ___ is a memory location whose contents can’t be changed while the program is running. C

a.  literal constant

b.  literal variable

c.  symbolic constant

d.  variable

21.  A ____ is an item of data whose value does not change while a program is running. A

a.  literal constant

b.  literal variable

c.  symbolic constant

d.  variable

22.  Giving a beginning value to a variable is called C

a.  creating.

b.  generating.

c.  initializing.

d.  introducing.

23.  A variable's ____ indicates which procedures in the application can use the variable. D

a.  breadth

b.  effect

c.  extent

d.  scope

24.  A variable that is declared in the form's General Declarations section is called a(n) ____ variable. B

a.  application

b.  form-level

c.  global

d.  local

25.  A variable can store ____ item(s) of data at any one time. B

a.  one or more

b.  one

c.  two

d.  three

26.  A variable that is declared in a code module’s General Declarations section is called a(n) ____ variable. C

a.  application

b.  form-level

c.  global

d.  local

27.  A variable that is used in the procedure in which it is declared is called a ____ variable. D

a.  explicit

b.  global

c.  literal

d.  local

28.  You create a symbolic constant with the ____ statement. A

a.  Const

b.  Constant

c.  Declare

d.  Public

29.  Assuming that the strCity variable contains the string, Glen Ellyn, and the strState variable contains the string, IL, which of the following will result in the string, Glen Ellyn, IL? B

a.  strCity & strState

b.  strCity & ", " & strState

c.  strCity & ", strState"

d.  "strCity, " & "strState"

30.  When an application is run, Visual Basic automatically loads and displays one of the forms in the project, which is called the ____ form. D

a.  beginning

b.  initial

c.  loaded

d.  startup

31.  The ____ statement brings a form into memory, but does not display the form on the screen. B

a.  Hide

b.  Load

c.  Show

d.  Unload

32.  A ____ form requires the user to take some action before the focus can switch to another form or dialog box, or before any subsequent code can be executed. B

a.  constant

b.  modal

c.  modeless

d.  static

33.  The ____ method removes a form from the screen but does not take it out of memory. A

a.  Hide

b.  Load

c.  Show

d.  Unload

34.  The ____ formula will center the frmInput form vertically on the screen. C

a.  frmInput.Top = Screen.Height - frmInput.Height / 2

b.  frmInput.Height = Screen.Height - frmInput.Height / 2

c.  frmInput.Top = (Screen.Height - frmInput.Height) / 2

d.  None of the above

35.  You can change the appearance of the mouse pointer while an application is running by setting the form’s ____ property. B

a.  mouse

b.  mousepointer

c.  picture

d.  pointer

36.  The ____ in a selection structure specifies the decision you are making. A

a.  condition

b.  false path

c.  requirement

d.  true path

37.  After the true path instructions of a selection structure are processed, which instructions will be processed next? C

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

d.  The set of instructions between the Then and the End If

38.  The > operator is an example of a ____ operator. D

a.  comparison

b.  logical

c.  mathematical

d.  relational

39.  Which of the following operators is evaluated first in an expression? C

a.  Expressional

b.  Logical

c.  Mathematical

d.  Relational

40.  You don't need to include a(n) ____ clause in an If...Then...Else instruction. A

a.  Else

b.  End If

c.  If

d.  Then

41.  What is the result of 6 > 5 - 3 + 4 / 2 * 5? D

a.  True

b.  12

c.  15

d.  False

42.  The ____ function temporarily converts a string expression to uppercase letters. D

a.  Case

b.  Convert

c.  UConvert

d.  None of the above

43.  If the txtState text box contains the letters Idaho, then the UCase(txtState.Text) = "Idaho" expression will evaluate to A

a.  false.

b.  true.

c.  a Type mismatch syntax error.

d.  IDAHO.

44.  Only one of the conditions connected by the ____ operator must be true for the compound condition to be true. C

a.  and

b.  not

c.  or

d.  Both A and B

45.  If the value of A is false and the value of B is true, then the value of A Or B is D

a.  can't be determined with the information provided.

b.  either true or false.

c.  false.

d.  true.

46.  If you use the ____ operator to combine two conditions, Visual Basic does not evaluate the second condition if the first condition is False. C

a.  not

b.  and

c.  or

d.  None of the above

47.  A ____ selection structure is one in which either the true path or the false path includes yet another selection structure. A

a.  nested

b.  compound

c.  dual

d.  decision

48.  You can use the ____ Case statement to code the Case selection structure in Visual Basic. c

a.  Highlight

b.  Focus

c.  Select

d.  Type

49.  The testexpression of the Select Case clause can contain D

a.  variables and constants.

b.  functions.

c.  operators.

d.  All of the above.

50.  Which of the following Case clauses could be used with the Select Case Val(txtNum.Text) clause? D

a.  Case "1"

b.  Case "2","3"

c.  Case UCase("5")

d.  Case Val(txtAge.Text)

51.  Which of the following is a valid Case clause when using the keyword To? A

a.  Case 1 To 5

b.  Case 4 To 2

c.  Case 5 To 0 step -1

d.  Both A and B

52.  Unless you expect the user to enter mostly incorrect values, you can save computer time by putting any error checking D

a.  after the Case structure's code.

b.  before the Case structure's code.

c.  in the first Case clause.

d.  in the Case Else clause at the end of the Case structure.

53.  If a form has four check boxes, what is the maximum number of check boxes that can be selected at any one time? B

a.  Three

b.  Four

c.  One

d.  Two

54.  You select a default option button by setting the option button’s ____ to True. D

a.  default

b.  initialize

c.  start

d.  value

55.  You can determine if an option button is selected or deselected by looking at its ____ property. D

a.  Checked

b.  Chosen

c.  Selected

d.  Value

56.  Which of the following can be used to determine if a check box named chkInsurance is selected? A

a.  chkInsurance.Value = 1

b.  chkInsurance.Checked = 1

c.  chkInsurance.Checked = ON

d.  chkInsurance.Value = True

57.  If two option buttons are on the form and three option buttons are in the frame1 control, selecting one of the option buttons in the form control will D

a.  have no effect on the other option buttons in the form.

b.  have no effect on the frame1 control's option buttons.

c.  deselect the other option button in the form.

d.  Both A and C

58.  The ____ function produces decimal numbers with the zero to one range, including zero but not including one. C

a.  Int

b.  Randomize

c.  Rnd

d.  Sequence

59.  Which of the following instructions is correct? A

a.  Static intCounter as Integer

b.  Static strCounter as Integer

c.  Static intCounter as String

d.  All of the above

60.  After displaying a predefined dialog box, the ____ function returns a value that indicates which button the user chose. D

a.  DialogBox

b.  InputBox

c.  Msg

d.  MsgBox

61.  The three forms of the repetition structure are C

a.  Do While, For Next, If...Then...Else.

b.  Do Until, Do While, If...Then...Else.

c.  Do Until, Do While, For Next.

d.  Do Until, For Next, If...Then...Else.

.

13

FBLA Visual Basic Programming 2003 District

62.  In the For Next loop, the ____ tells the loop where to begin, the endvalue tells the loop when to stop, and the ____ tells the loop how much to add to (or subtract from) the ____ each time the loop is processed. C

a.  beginvalue, increment, endvalue

b.  beginvalue, endvalue, counter

c.  startvalue, stepvalue, counter

d.  startvalue, endvalue, counter

63.  Which loop can you use to repeat a set of instructions a specified number of times? D

a.  For Next

b.  Do Until

c.  Do While

d.  All of the above

64.  When using the ____ loop, the loop instructions are processed only if the condition evaluates to false. A

a.  Do Until

b.  Do While

c.  Both A and B

d.  None of the above

65.  In the ____ loop, the condition is not evaluated until after the loop instructions are processed the first time. A

a.  Do Until

b.  Do While

c.  For Next

d.  Both A and C

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

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

a.  5

b.  1

c.  4

d.  6

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

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

a.  0 (zero)

b.  4

c.  5

d.  1 (one)

68.  Which of the following is a posttest loop? A

a.  Do Until

b.  Do While

c.  For Next

d.  Both A and C

13

FBLA Visual Basic Programming 2003 District

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

intX = 1 Do While intX > 2 intX = intX + 1 Print intX Loop D

a.  1, 2

b.  1, 2, 3

c.  2

d.  No numbers will print on the form.

70.  Assume that a user wants to enter and print the sales made by three salespeople. In the following code, how many times will the InputBox statement within the loop be processed? curSales = InputBox("Enter the sales amount") Do While curSales > -1 Print curSales curSales = InputBox("Enter the sales amount") Loop C