Accounting
Anthropology
Archaeology
Art History
Banking
Biology & Life Science
Business
Business Communication
Business Development
Business Ethics
Business Law
Chemistry
Communication
Computer Science
Counseling
Criminal Law
Curriculum & Instruction
Design
Earth Science
Economic
Education
Engineering
Finance
History & Theory
Humanities
Human Resource
International Business
Investments & Securities
Journalism
Law
Management
Marketing
Medicine
Medicine & Health Science
Nursing
Philosophy
Physic
Psychology
Real Estate
Science
Social Science
Sociology
Special Education
Speech
Visual Arts
Programming Language
Q:
When a variable is declared in a(n) ____ statement at the beginning of a procedure, it has procedure scope and can be used by the entire procedure. a.
Dim b.
New c.
As d.
Create
Q:
When you declare a variable in the For clause, the variable has ____ scope and can be used only within the For...Next loop. a.
program b.
block c.
solution d.
method
Q:
You can use the ____ portion of the For clause to declare the counter variable. a.
As dataType b.
dataType c.
Dim As dataType d.
Dim dataType
Q:
The counter variable must be a(n) ____ variable. a.
iterative b.
alpha c.
alphanumeric d.
numeric
Q:
You code a posttest counter-controlled loop using the ____ statement. a.
Execute"¦Until b.
Do...Loop c.
For"¦Next d.
Do"¦Counter
Q:
A counter-controlled loop uses a counter ____ to keep track of the number of times the loop instructions are processed. a.
variable b.
constant c.
condition d.
control
Q:
A loop whose instructions you want processed a precise number of times is often referred to as a ____ loop. a.
conditional b.
precision c.
counter-controlled d.
sequential
Q:
You can use the ControlChars.NextLine constant to advance the insertion point to the next line in a control, file, or printout.
Q:
When concatenating strings, you must be sure to include a space before and after the ampersand.
Q:
With the negation operator, a positive number preceded by the negation operator remains a positive number.
Q:
In the Financial.Pmt method, if Rate is a monthly interest rate, then NPer must specify the number of monthly payments.
Q:
The mathematical formula for calculating a periodic payment on a loan is rather complex, so Visual Basic provides a method that performs the calculation for you.
Q:
To have the Audio object play an audio file, you use its Sound method.
Q:
Q:
The My.Computer object provides access to several objects, such as your computer's Audio object.
Q:
The For"¦Next statement's counter variable must be numeric.
Q:
You can declare the counter variable in a Dim statement, as long as the Dim statement appears somewhere after the For"¦Next statement.
Q:
When you declare a variable in the For clause, the variable stays in the computer's internal memory when the loop ends.
Q:
You do not need to specify the name of the counter variable in the Next clause, but doing so is highly recommended because it makes your code more self-documenting.
Q:
The For...Next statement provides the most convenient way to code a posttest counter loop.
Q:
A pretest counter loop can only be coded using the Do"¦Loop statement.
Q:
A counter-controlled loop can be either a pretest loop or a posttest loop.
Q:
You may test an initial condition of a posttest loop by ____.
a. using a nested loop for the initial condition
b. placing the posttest loop inside a selection structure
c. resetting the counter variable on each pass of the loop
d. initializing all loop variables to zero
Q:
One problem with posttest loops is that they always execute at least once. You can fix the problem in the Posttest Loop button's code by placing the posttest loop in a(n) ____ structure. a.
selection b.
execute c.
iterative d.
another posttest loop
Q:
You are given the following statement:
Do ... Loop Until intCounter > intNumTimes.
The Until intCounter > intNumTimes represents a ____. a.
loop condition b.
loop exit condition c.
loop full condition d.
loop retreat condition
Q:
In the posttest syntax for a Do"¦Loop, the {While | Until} condition section is part of the ____ clause. a.
Execute b.
Process c.
Do d.
Loop
Q:
In the pretest syntax for a Do"¦Loop statement, the {While | Until} condition section is part of the ____ clause. a.
Execute b.
Process c.
Do d.
Loop
Q:
A game program uses the ____ loop to control the display of the menu, which must appear on the screen at least once. a.
prettest b.
posttest c.
DoAfter d.
ProcessAfter
Q:
____ loops should be used only when their instructions must be processed at least once. a.
Posttest b.
Pretest c.
DoAfter d.
ProcessAfter
Q:
In the ____ loop, the condition appears in the last line. a.
sequential b.
pretest c.
posttest d.
iterative
Q:
In the ____ loop, the condition appears in the first line.
a. sequential
b. pretest
c. posttest
d. iterative
Q:
The instructions in a posttest loop ____. a.
may never be processed b.
should only be processed once c.
will always be processed at least twice d.
will always be processed at least once
Q:
The ____ loop condition is evaluated after the instructions within the loop are processed. a.
posttest b.
pretest c.
before d.
after
Q:
The ____ loop condition is evaluated before the instructions within the loop are processed. a.
posttest b.
pretest c.
before d.
after
Q:
When a posttest loop is placed in a selection structure, the loop will be processed only when the selection structure's condition evaluates to True.
Q:
The diamond that represents the condition appears at the top of the loop in the flowchart of a posttest loop.
Q:
Pretest loops should be used only when their instructions must be processed at least once.
Q:
In the posttest syntax, the only purpose of the Do clause is to mark the beginning of the loop.
Q:
In the posttest syntax, the condition is evaluated before the loop instructions are processed.
Q:
In the pretest syntax, the condition is evaluated after the loop instructions are processed.
Q:
The Do"¦Loop statement can be used to code a pretest loop as well as a posttest loop.
Q:
A pretest loop is easier to write and understand than a posttest loop with a selection structure.
Q:
Most programmers prefer to use posttest loops.
Q:
The instructions in a pretest loop will be processed at least once.
Q:
The difference between pretest and posttest loops pertains to how the accumulator is evaluated.
Q:
A repetition structure can be either a pretest loop or a posttest loop.
Q:
If a run time error occurs, you can stop the application by clicking DEBUG on the menu bar and then clicking ____. a.
End b.
Stop c.
End Debugging d.
Stop Debugging
Q:
Which of the following statements increments the intNum variable's value by 2?
a. intNum = intNum " 2
b. intNum -= 2
c. intNum += 2
d. intNum ++ 2
Q:
When entering the InputBox function in the Code Editor window, the prompt, title, and defaultResponse arguments must be enclosed in ____. a.
quotation marks b.
asterisks c.
square brackets d.
slashes
Q:
The empty string is represented by the ____ constant in Visual Basic. a.
Nothing b.
String.Nothing c.
String.Empty d.
Empty.String
Q:
If the user clicks either the Cancel button in the dialog box or the Close button on the dialog box's title bar, the InputBox function returns ____.
a. an empty string
b. the value contained in the input area of the dialog box
c. CancelValue
d. nothing
Q:
If the user clicks the OK button, the InputBox function returns ____.
a. an empty string
b. the value contained in the input area of the dialog box
c. OKValue
d. Nothing
Q:
The result of forgetting to enter the update read is a(n) ____ loop. a.
empty b.
temporary c.
infinite d.
short-circuited
Q:
In a loop that begins with a priming read, the ____ provides the way to end a loop. a.
changing read b.
update read c.
ending read d.
special read
Q:
A(n) ____ variable is a numeric variable used for adding something together. a.
static b.
named c.
accumulator d.
counter
Q:
You can delay program execution using the ____ method. a.
Pause b.
Sleep c.
Delay d.
Refresh
Q:
You can use the ____ method to redraw the form. a.
Redraw b.
Renew c.
Refresh d.
Update
Q:
You can use the ____ statement to code both a pretest loop and a posttest loop. a.
For"¦Next b.
While"¦Wend c.
Next"¦For d.
Do"¦Loop
Q:
In a(n) ____ loop, the evaluation occurs after the instructions within the loop are processed. a.
pretest b.
inline test c.
execute d.
posttest
Q:
In a(n) ____ loop, the loop condition is evaluated before the instructions within the loop are processed. a.
pretest b.
posttest c.
inline test d.
execute
Q:
Programmers use the ____ structure when they need the computer to repeatedly process one or more program instructions until some condition is met, at which time the processing ends. a.
decision b.
repetition c.
selection d.
declaration
Q:
You can use the arithmetic assignment operator (+=) to abbreviate the statement intNum = intNum + 1 as follows: intNum = 1.
Q:
The Windows standard is to use book title capitalization for the prompt, but sentence capitalization for the title.
Q:
The value returned by the InputBox function is the same whether the user clicks the OK button, Cancel button, or Close button.
Q:
A loop that has no way to end is called an infinite loop or an forever loop.
Q:
Any code containing a priming read must also include a matching update read within the loop.
Q:
The priming read is used to prepare or set up a loop.
Q:
Like counter variables, accumulator variables are updated outside the loop.
Q:
Repetition structures use accumulator variables to tally information such as the total dollar amount of a week's payroll.
Q:
Like counter variables, accumulator variables are initialized inside the loop.
Q:
The loop condition is represented by a parallelogram in a flowchart.
Q:
Updating refers to the process of either adding a number to or subtracting a number from a counter's value.
Q:
Like the condition in the If"¦Then"¦Else statement, the condition in the Do"¦Loop statement must evaluate to a Boolean value.
Q:
A condition can contain variables, constants, properties, methods, or operators.
Q:
A repetition structure can only be a pretest loop.
Q:
All computer programs are written using one or more of three control structures: sequence, selection, or repetition.
Q:
The syntax of the trim method is ____. a.
string trim b.
string.Trim c.
Trim.string d.
trim string
Q:
In the method call string.Trim, string typically is either the Text property of a control or ____. a.
any variable of a character-based type b.
the literal string c.
the name of your program d.
the name of a String variable
Q:
You can use the ____ method to remove any spaces that appear before and after the data in the variable. a.
Trim b.
Left c.
Right d.
RmPad
Q:
You can use the txtType control's ____ event to prevent the text box from accepting the space character.
a. Key
b. Pressed
c. KeyPress
d. StillPressed