CS 1401, Quiz #5

Date: Monday, February 18, 2008
Name: ____________________________________________________________
Class section MWF 8:30 am 

1. For each of the following topics, write "yes" or "no" depending on whether this topic is covered in Chapter 5, the chapter that you were supposed to read before the class:

spiral lists

while loops

for loops

static variables

2. Draw truth tables for "and" and "or" and use these truth tables to find the truth value of the statement (3 * 4 == 12) && ((9 > 10) || (7 < 5)).

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

3. Write down a statement that, given three real numbers x, y, and z, displays:

·         the word  "inside" if  y  is within the closed interval [x,  z]  (i.e., if x <= y <= z) and

·         the word “outside” otherwise.