Fall 2002 Test #1 Review Page

CSE1320 Sections 003 and 501                                                                   Dr. Tiernan’s sections

Topics to be covered on Test #1 with accompanying notes from Ch. 1 – 4.2:

 

Main Topics                                                            Test #1 is IN CLASS Thursday, September 12

Data Types

            int       long,short      unsigned

            char    signed

            float    exponential, decimal notation

      know the:

meaning of a sign bit

min ranges for integers as relates to ANSI C

way to find the implementaion dependent ranges using the limits.h file

sizeof() operator

meaning of type conversions

reasons for type conversions         automatic, forced, explicit

      decimal (base 10) conversion

            to binary (base 2)

            to hexadecimal (base 16)

Variables

            know the rules for valid identifiers

            know the difference between initialization and assignment

            expressions vs. statements

            know the scope of variables within program blocks

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

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

 

 

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

            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

            getchar and putchar

be able to list at least two 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

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 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.