AnswersASC Programming Games Apps and SocietyLoops–Practice with the While Loop

Loops–Practice with the While Loop Answers

9 verified answers1 views
3

When comparing while loops and do-while loops, what is the main difference?

A
how rapidly a loop is run
B
how many lines of code are used
C
where the test condition is located in the loop
D
one uses numeric and one uses string
4

What does “++” do to a variable?

A
It increases the value of the variable by a given number.
B
It increases the value of the variable by 1.
C
It decreases the value of the variable by 1.
D
It adds the value of the variable to the counter.
5

How are postfix and prefix operators similar?

A
Both involve the use of the “+” or “-" operator.
B
Both use order of operations to assign values.
C
Both are used to increment or decrement variables.
D
Both deal with string literals and characters.

Did you find these answers helpful?