Spring 2003 Test #2 Review Page

CSE1320 Sections 003 and 501                                                                   Dr. Tiernan’s sections

Topics to be covered on Test #2 with accompanying notes from Ch. 4.3 – 7.3

(I assume that you can also use any material from earlier in the class)

 

Main Topics                                                                    Test #2 is IN CLASS Tuesday, March 4

Arrays

            be able to declare an array

            know the range of index values used for arrays

            understand how arrays are stored in memory

            declaring functions with arrays as parameters

            passing arrays as parameters

                        the whole array using array name

                        a single element of an array

            accessing an array and its elements inside the function it was passed to

            using arrays as pointers

            efficiency of array notation vs pointer arithmetic

Pointers

            know the rules for creating

            know what a pointer contains

            know the notation: *, &

            understand pointer arithmetic

            know the operations that can be performed on pointers

            be able to access the contents of the location the pointer points to

            vocabulary – dereference, indirection, addressing operator

            initializing pointers and NULL

            passing pointers as parameters

            allocating memory with pointers

                        malloc, calloc, free

            double indirection

            array notation with pointers

            casting pointer types

Strings

            string constants

            null character/end-of-string market/’\0’

            declaring

            reading and writing strings

            need for end-of-string markers

            %s conversion specifier

            gets, puts

            difference from character arrays

            storing strings in character arrays

            strlen, strcat, strcpy, strchr, strcmp

Control Structures

      do-while

      switch

            allowable types of control expressions

            syntax of cases

            behavior

            use of break

      break, continue

Recursion

      concept

      implementing recursion

            base case(s)

            recursive calls

      tracing recursive exceution until completion

            cost / benefits

Structures

            creating data types

            declaring variables

            accessing members

            assignment of whole structures and of member value

 

 

Secondary and Related Topics

Control Structures

      flow of control

            return, exit()

            goto

C library functions

be able to list at least three of the .h files from the standard C library – see Appendix F

Preprocessor directives

include, define, ifdef

Style

            commenting                                                    whitespace

            module size                                                     visually useful indenting

            meaningful identifiers                                    consistent use of braces

Program Development

            stubbing out functions

            free-format language

 

Test will have some or all of the following characteristics:

            multiple choice questions (not more than 10) – typically 1 to 4 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 curve on a set of test grades will NOT be the curve used for class grades.

 

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.