Quiz 5 Review, CPSC 110,
Some things you
should know:
This is NOT an all
encompassing list, but it should help.
- Your Name, Your ID, Your Section Number
- Recall how to open files for reading
and writing.
- Know about if and else (may want to
recall case statement but not too important)
- What is a block of code? Procedure is a
block? What about parameters with it?
- What is a parameter? What are the types
of parameters?
- This class is about Problem Solving (in
a structured way (using Turbo Pascal) ).
- Read, Readln, Write, Writeln are what?
How do you use them?
- Be able to evaluate Boolean expressions.
- What is TYPE? Where is it used in a
Pascal program? What does it do?
- What are subrange types?
- What are ordinal and enumerated types?
Give examples.
- Enumerated types always have 2
properties: order of their members and names of their members.
- How do you declare a variable of a type
you just defined?
- Understand Loops (Whiles, Fors, and
Repeats)
- Be able to read and write programs using
functions and procedures.
- Understand Arrays.
- What are arrays? How do you declare
them.
- What are the parts of the below picture?
- Arrays can be accessed sequentially and
randomly.
- Look at the sorting pseudocode presented
on Friday in class (or look at the books) or look up Bubble Sort somewhere.
Be able to use arrays with it.
- Given
VAR
x : array[1..10] of char;
{ yes this
really compiles, its just a bad way to do it } .
i : integer;
And i is initialized to 5.
Which of the
following will COMPILE AND/OR RUN
a.
x[ i ] := q;
b.
x[ i + 12 ] := p;
c.
x[54] := s;
d.
x[ i 5 ] := 6;
e.
and similar
- Be able to WRITE A PROGRAM
FROM SCRATCH or at least
fill in blanks for one.
- Be able to determine the output of a
given program see the book for examples.
- Other things talked about in class
and/or in lab and/or homework and/or some from the book.