Spring 2009 Test #2 Review Page

CSE1320 Section 002                                                                                        Dr.TiernanÕs section

Topics to be covered on Test #2 with notes from Ch. 1 Ð 11 plus other material (including the software engineering presentation) as covered in class:

 

Main Topics                                                                                                      Test #2 is IN CLASS

Recursion                                                                                   Section 002 ÐMon. Apr. 13, 1:00pm

            Be able to define recursion and discuss recursion vs. iteration

            Merge sort, Binary search

            Be able to write a recursive function and understand a recursive function

Dynamic memory allocation

            Malloc, calloc, and free

            Memory allocation and pointers

            Why would dynamic memory allocation be used

Structures                                                                                                                                               

            Creating data types, Declaring variables, Accessing members

            Assignment of whole structures and of member value

            Bit fields

            Pointer members for linked lists

            Pointers to structs

Enumerated types

            Be able to create an enumerated type and declare a variable

Form and purpose

Unions

            Be able to create a union type and declare a variable

Form and purpose

Scope and storage class

            Local and global

            Auto, static, register, extern, and typedef

            Difference between scope and storage class and how they are related

Strings and string functions

            String functions including but not limited to:

                        Strcat, strcpy, strlen, É

            Allocating space to store strings

Command line parameters

            Where parameters are passed from

            Format of parameters

            Argc, argv

Input / Output

            Files; fopen, fclose, FILE *

            Formatted input and output from files and standard I/O

            Character input and output from files and standard I/O

            Binary data input and output from files

            String input and output from files and standard I/O

            Random file access

C library

            Time and date

            Math

            Character

Preprocessor directives

            #include

            #define used for macros

            Conditional compilation

Pointers

Base type, what a pointer contains, accessing contents, notation: *, &

            Understand pointer arithmetic, array notation with pointers

            VocabularyÐ dereference, indirection, addressing operator

            Passing pointers as parameters

Double indirection

Interpreting C statements and declarations

             Pointers to functions

Abstract data types (ADTs)

             ADT vs. physical data type

            Stack

            Queue

            Array

            What characteristics define an ADT?

 

Secondary and Related Topics

Linked lists

            What is it for?

Arrays

            Declaring, index values, memory

            Passing arrays as parameters

            Using arrays as pointers

Multidimensional arrays and pointers

            Declaration, implementation, initialization of arrays

            Array notation and pointer arithmetic to access array elements

            Arrays of pointers, double indirection - pointers to pointers

Sorting and searching

            Big O notation and efficiency

            Linear search

            Merge sort, selection, and bubble sort

Function declarations and definitions

      why ANSI C uses prototype declarations

      difference between declaration and definition of a function

Software engineering

            Identify/describe the phases of software engineering

            Understand the importance of testing

            Be able to discuss various aspects of software quality

Data Types

            int        long     short    char

            float     double      long double

      know the:

meaning of a sign bit

sizeof() operator

meaning of type conversions

Variables

            Know the difference between initialization and assignment

Control Structures

if                      (conditional)                ifelse                 nestedif else

for                    (initialization ;test; processing)

            return

be able to analyze the values after the execution of a loop or selector

Operations

            Recognize all the operations we have discussed

            Use the relational and arithmetic operators in writing code segments

Functions

            Know the rules for creating

                        Function prototype declarations

                        Function definitions

            Know what function is required in any C program

            Understand the difference between formal parameters and actual parameters

            Understand pass by value and pass by reference

            knowhow to call a function

Algorithms

            Turning algorithms into functions

            Sort and search algorithm efficiency

Style

            Visually useful indenting

            Consistent use of braces

Program Development

            Guidelines for program development and debugging

 

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 as68/89*100 = 76 so that student would get a C (rather than a D for the original68).

 

The test will make you think not just remember.  I write very challenging questions that require you to think all the way through them.  A small number 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 previous semesterÕs tests.  They will give you a sense of how my tests are written.