(See attached file for full problem description)
1. Analyze the following pseudocode. Whats the ansr's final value ?
Num = 8 ansr =0 if num > 5 then if num < 20 then ansr =1 else ansr = 2 endif endif .
2. Which piece of pseudocode represent the checking the loop condition
A) rep = 1 (B) rep=rep +1 (C) while (rep< 5) (D) print " warning "
3.In a control break routine, how do you know when the last category has finished being processed ?
A) at the end of the file
B) when every category is the same
C) when the value of the category is the same as the vale of the control break field
D) there is no way to tell
4.Which of the following is another name for an array?
5) What piece of pseudocode represents incrementing the loop control variable.
A) rep = 1
B) rep=rep + 1
C) while (rep<5)
D) print "warning "
6) Which of the following is a nontrivial true example of the greater than or equal to operator ?
7) A) 1> 5
B) 1> = 5
C) Time =3
D) Time > = 4
8) In order to have the most efficient program, which question should be asked first when working with an AND decision.
A) the one that is less likely to be true
B) the one that is more likely to be true
C) the one that involves fewer comparisons
D) the one with the lower valve
9) When listing employees who make more that $10 and less than $12 per hour, you are making a decision bases on a:
A) Range (B) row (C) variable (D) value
10) When a loop control variable is not altered during loop execution, a(n) __________ loop may result.
11)In the following pseudocode sample which will be printed if the value of empDept is 11?
If empDept >=8 the
superviorName = "Fontana
if empDept > = 4 then
supervisorName = "Escher "
supervisorName + "Dillion"
11)Which of the following is true of a structured loop
A) the loop can exit from any point
B) the loop body must execute at least one
C) the loop condition represent the only exit from the loop
D) the loop can repeat an infinite number of times
12)When creating a grand total by adding up several subtotals you are
A) rolling up the totals
B) grouping the totals.
C) grabbing the totals
13) What is the term for each part of an array
14)Array subscript are always
A) large numbers (B) characters (C) negative values (D) integers
FoundIt ="N" then
While x< 7
If custItemNo = validItem[x] then
foundIt = "Y"
if foundIt ="N" then
print "No such item"
15) In the above code which of the following is a flag variable
16) In the above code which of the following is an array variable
17) In the above code , which of the following is the variable being searched for.
18) If the array list has 4 elements then the statement, then the statement list  is:
B) out of bounds
C) out of range
D) equal to zero
19) In a for loop, a(n) _____ value is used to control how the loop control variable is incremented.
A) step (B) group (C) flag (D) sentinel
20) A while loop has a(n) _____ condition.
21)Array subscripts must be :
B) greater than zero
D) with decimal places
Answer to first document, please See attached
Answers to problems in the second documents: