Spring 2005 Test #2 Review Page
CSE1320
Sections 501
Dr. TiernanÕs sections
Topics to be covered on Test #1
with notes from Ch. 5.4 Ð 5.7, 6, 7, 8, 10 plus other material
(including parts of Ch. 9 and 11 and Ch. 1 Ð 5) as previously covered in class:
Control Structures
do-while
switch
allowable types of control expressions
syntax of cases
behavior
use of break
break, continue
return
Recursion - (very likely you will have 2 questions relating to recursion)
concept
implementing recursion
base case(s)
recursive calls
recursion vs. iteration
cost / benefits
Structures
creating data types
declaring variables
accessing members
assignment of whole structures and of member value
bit field members
defining
addressable boundaries
Types
enumerated type definition
declaring variables of an enumerated type
how enum types are actually treated in C - integer constants
use in switch / benefits
use of enumerated types
union type definitions
declaring union variables
many members like a structure
only one valid member at a time
data in a member is only meaningful to a single member
up to programmer to distinguish meaning
use of unions
Storage
class and scope
the five storage classes Ð auto, static, register, extern, typedef
what the storage classes define for a variable
what the scope of a variable is
global vs. local variables
linking variables between files in the same program
Function
declarations and definitions
why ANSI C uses prototype declarations
interpreting function definitions (p. 463 and p. 509) (probably two questions on this)
pointers to functions
ADT
(Abstract Data Types)
stack
description
input to a stack
output from a stack
checks on a stack
possible imp lementations
queue
how is it different from a stack
Files and I/O
how to declare file variables
how to connect file variables to actual files in the local directory
how to open files for reading, writing or appending (all possible combos)
fopen and fclose errors that can occur
input/output from files using
fscanf, fprintf, putc, getc, getline, fgets, fputs, fread, fwrite
file pointer movement
fseek, ftell
Strings
string functions
Searching and sorting algorithms
Turning algorithms into function
Big O notation for order of efficiency of an algorithm
Be able to recognize the following,
describe in words, and trace execution of
Linear search algorithm
Selection sort
algorithm
Bubble sort
algorithm
Control Structures
goto, exit()
Conditional expression
how is it used
Error handling
with input and output
Program Development
breaking code into modules
breaking programs into separate files
Precedence
for the operators we have discussed so far, be able to give the precedence of
each
group of operators to the other groups Ð arithmetic, logical, bitwise,
relational
know Dr. TÕs favorite page, i.e. Òthe most useful page in the bookÓ
Test will have some or all of the
following characteristics:
multiple choice questions (not more than 10) Ð typically 1 to 2 points each
short answer questions
coding questions which require either
writing code or
interpreting code or
debugging code
( ÒcodeÓ includes declarations, preprocessor directives, function definitions and
general coding of statements and control structures and I/O commands)
matching questions
fill-in-the-blank questions
Questions generally have their point value listed in braces at the end/side of the question
Every test will have at least 10 points worth of extra credit available
Test grades are assigned on a curve based on the range of actual scores on the test, i.e. the highest score on the test (for example, an 89) will be the top of the curve so all scores will be assigned based on where they fall (100 Ð 90 A, 89 Ð 80 B, etc.) AFTER the actual score has been divided by the curve. For example, a high score of 89 would give that student an A because 89/89 100 = 100. On the same test then, a score of 68 would be curved as 68/89*100 = 76 so that student would get a C (rather than a D for the original 68).
The test will be hard. I write very challenging questions that require you to think all the way through them. A few of the questions will be memory type questions because some rules must be memorized to make a student an efficient programmer in a language. Most however will require lots of mental effort. Do not get too upset about it Ð remember EVERYONE is suffering through the same test you are and that everyoneÕs grade will be curved. Check out my website for a few example test questions from last semesterÕs tests. They will give you a sense of how my tests are written.