Summer 2002 Test #1 Review Page

CSE1320 Section 501                                                                                        Dr. Tiernan’s section

Topics to be covered on Test #1 with accompanying notes:

 

Main Topics                                                                         Test #1 is IN CLASS Monday, June 24

Data Types

            int       long,short      unsigned

            char    signed

            float    exponential, decimal notation

      know the:

representation of negative integers

max and min ranges for integers as relates to ANSI C

limits.h file

sizeof() operator

meaning of type conversions

reasons for type conversions         automatic, forced, explicit

      decimal (base 10) conversion

            to hexadecimal (base 16)

            to binary (base 2)

Variables

            know the rules for valid identifiers

            know the difference between initialization and assignment

            expressions vs. statements

Control Structures

know what is meant by repetition, selection, sequential control structures

if                      (conditional)              if else              nested if else

while              (test)                           for                   (initialization, test, processing)

            blocks/compound statements { } vs. single statements

understand the return command in a function

Operations

            recognize all the operations we have discussed

            use the relational and arithmetic operators in writing code segments

            perform bitwise operations on binary inputs

            interpret combinations of test conditions which are combined with the logical operators

            interpret conditional assignments and increment/decrement operators in code

            be able to interpret test conditions for True/False (nonzero/zero) value

Input and output functions

scanf and printf commands

controlling the type of the input and output information with the % control operators

controlling output format with the / formatting operators

gets and puts

getchar and putchar

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 pointer notation

                        a single element of an array

            accessing an array and its elements inside the function it has been 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, casting pointer types

Strings

            declaring

            need for end-of-string markers

            difference from character arrays

 

 

 

 

Secondary and Related Topics

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, D-4, Precedence chart

Functions

            know the rules for creating

                        function prototype declarations

                        function definitions

            know what function is required in any C program

            understand the use of function parameters including void

                        know call-by-reference and call-by value

            understand the return type of a function

            know how to call a function

            understand how to use the return value of a function

C library functions

            strlen, strcat, strcpy, strchr, strcmp

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

Preprocessor directives

      know what each of the following do:

            #include <stdio.h>

Style

            commenting                                                    whitespace

            module size                                                     visually useful indenting

            meaningful identifiers                                    consistent use of braces

 

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.