CS 15900 Lab Quiz 8

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

22 Terms

1
New cards

The contents of a loop have been identified to be repeated in a program.

T

2
New cards

An iteration is one execution of all statements found inside the body of a loop.

T

3
New cards

The initialization of the loop control variable must take place outside the body of a pretest loop.

T

4
New cards

The condition that determines whether the task to repeat is finished is known as the loop control expression.

T

5
New cards

In a pretest loop the control expression is evaluated before each iteration, including the first iteration

T

6
New cards

In a post-test loop the minimum number of times that the statements found inside of the loop are executed is one.

T

7
New cards

The action that is responsible for changing the result of the loop control expression from true to false is the loop update.

T

8
New cards

The loop control variable is commonly a part of the loop control expression and the recipient of the loop update action

T

9
New cards

In an event-controlled loop we know the number of times that the actions found inside the body of the loop will be executed

F

10
New cards

A counter-controlled loop may execute a constant number of iterations.

T

11
New cards

It is possible for the number of times a counter-controlled loop will iterate to depend on the value of a single variable or expression.

T

12
New cards

The number of times that the loop control expression is evaluated is one more than the number of iterations in a pretest loop.

T

13
New cards

The while loop requires the use of parentheses around the loop control expression

T

14
New cards

The do-while loop will terminate with a semicolon after its loop control expression

T

15
New cards

Similar to their required use in the if construct it is a course standard to always make use of { and } with all looping constructs

T

16
New cards

A limited amount of control structures are permissible in the main function to ensure that it is the main function which makes most of the function calls for a program

T

17
New cards

Input validation is an example of an event-controlled problem.

T

18
New cards

Selection by itself is insufficient for input validation because it provides only a finite number of opportunities for the user to input valid data

T

19
New cards

In this course you will be expected to validate for the input of both the range of acceptable values and the correct data type

F

20
New cards

It is expected for many cases that the code for the validation of input be found in the same function that contains the prompt for input and scanf statement

T

21
New cards

The short-circuit method of evaluating logical expressions does not apply to loop control expressions

F

22
New cards

Control-forcing statements such as break, continue, exit, and the use of multiple return statements in a user-defined function are prohibited by course standards as mechanisms to terminate repetitive processes

T