CS 159 Exam 2 with Questions and Answers
CS 159 Exam 2 with Questions and Answers An infinite loop is a logical error ANSWER True The only way to stop a program caught in an infinite loop is to shut down your terminal software ANSWER False A nested loop is a repetitive process contained inside of another repetitive process ANSWER True One approach to potentially make solving problems that require nested loops easier is to separate each repetitive process into its own function ANSWER True According to the course standards a for loop should only be used with counter-controlled processes ANSWER True According to the course standards if all three expressions are not needed in a for loop then you should instead make use of a while loop for your pretest looping needs ANSWER True All while loops can be converted into for loops that abide by course standards ANSWER False You can make of x++, x+=1, and x =x+1, interchangeably as the update (third) expression for a for loop to increment the loop control variable ANSWER True The gcc compiler as used on the server this semester will permit a
Written for
- Institution
- CS 159
- Course
- CS 159
Document information
- Uploaded on
- October 21, 2024
- Number of pages
- 10
- Written in
- 2024/2025
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cs 159 exam 2 with questions and answers
Also available in package deal