Deck 11: Interest Calculator Application
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/9
Play
Full screen (f)
Deck 11: Interest Calculator Application
1
The______ part of a for statement header specifies the increment or decrement in a for statement.
A) first
B) second
C) third
D) None of the above.
A) first
B) second
C) third
D) None of the above.
third
2
A(n)_____ modifies the control variable each time the loop is performed.
A) loop-continuation condition
B) decrement statement
C) increment statement
D) loop-termination condition
E) Either b or c.
A) loop-continuation condition
B) decrement statement
C) increment statement
D) loop-termination condition
E) Either b or c.
Either b or c.
3
A(n) _____is used to determine whether a loop continues to iterate.
A) control variable
B) initial value
C) type
D) loop counter
E) Either a or d.
A) control variable
B) initial value
C) type
D) loop counter
E) Either a or d.
Either a or d.
4
To avoid logic errors, counter-controlled loops should be controlled using ______variables.
A) int
B) bool
C) double
D) decimal
E) None of the above.
A) int
B) bool
C) double
D) decimal
E) None of the above.
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck
5
The body of a for statement executes while the_______ remains true.
A) initial value
B) loop-continuation condition
C) loop-initial condition
D) loop-value condition
E) None of the above.
A) initial value
B) loop-continuation condition
C) loop-initial condition
D) loop-value condition
E) None of the above.
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck
6
Variables of type ______store a series of characters.
A) bool
B) string
C) decimal
D) int
E) double
A) bool
B) string
C) decimal
D) int
E) double
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck
7
The counter variable in a for statement must be declared______ .
A) first
B) second
C) third
D) None of the above.
A) first
B) second
C) third
D) None of the above.
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the following is the appropriate for header for varying the control variable over the following sequence of values: 3, 6, 9, 12?
A) for ( int i = 3; i <= 12; i++ )
B) for ( int i = 12; i > 0; i -= 3 )
C) for ( int i = 3; i <= 12; i -= 3 )
D) for ( int i = 3; i <= 12; i += 3 )
E) None of the above.
A) for ( int i = 3; i <= 12; i++ )
B) for ( int i = 12; i > 0; i -= 3 )
C) for ( int i = 3; i <= 12; i -= 3 )
D) for ( int i = 3; i <= 12; i += 3 )
E) None of the above.
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck
9
When assigning text to a string variable, you must begin and end the text with a(n)_______ .
A) single-quote character (')
B) double-quote character (")
C) ampersand character (&)
D) dollar-sign character ($)
E) None of the above.
A) single-quote character (')
B) double-quote character (")
C) ampersand character (&)
D) dollar-sign character ($)
E) None of the above.
Unlock Deck
Unlock for access to all 9 flashcards in this deck.
Unlock Deck
k this deck