Fundamentals of Computer Science in C

Final Exam Study Guide

Created: December 9, 1998

Dear Class,

This handout represents all of the important concepts that may appear on the final exam. The final exam is cumulative, but it will be weighted towards the second half of the semester. You can therefore expect lots of questions on arrays, pointers, structures, file input/output and call by reference v. call by value. You can also expect some questions regarding storage classes, scope, random numbers, data types, while loops, for loops, switch statements, logical operators, increment operators, operator precedence and function prototypes. There may be one or two questions regarding recursion as well, but we did not have enough time to do recursion justice -- so, I will not put anything too complex.

The format of the final will be the same as the midterm. It will be closed book, and will contain several sections, including: True/false questions, short answer questions, find the bug, determine the output, and write the function.

Clearly, we have not covered all the topics described in the text book. I have therefore provided a few notes below regarding topics and sections of the text that you can safely ignore.

As you study for the final, I recommend that you review the following (in order of importance):

If you have any questions over the weekend, please send me email. Otherwise, I will see you all on Monday.

-- Ethan

Week of


Reading Assignment

Sept. 7

Introduction/Overview of Course:

  • Introduction to Main themes
  • The Lego Theory
  • What's a programming language?
  • Why Learn C?
  • "Hello, World!" Program

Sept. 14

Introduction to C Programming:

  • Basic Input/Output: printf() and scanf()
  • Escape Characters, e.g. \n \t, etc.
  • Basic Data Types: ints and floats
  • Mixing ints and floats: truncation and promotion
  • Naming conventions for variables
  • Basic Arithmetic: integer v. modulus division
  • Operator Precedence

All of Chapter 2

Sept. 21

Structured Program Development:

  • If/Else Selection Structure
  • Important Examples:, Versions 1.0 - 3.0
  • Assignment Operators
  • Increment Operators: PostIncrement v. PreIncrement
  • While Loops: understanding priming and sentinel

Chapter 3
Ignore: Sections 3.2-3.4 regarding pseudo-code

September 28

Program Control:

  • For Loops
  • Data Types: short, int, long, char, float, double
  • Switch Statements

Chapter 4
Ignore: Section 4.8 and 4.9 (Do...While and break/continue)

Oct. 5

Logical Operators

  • Logical Operators: And, Or, Not

Section 4.10

Oct. 12


  • Why use functions?
  • Function Prototypes
  • Function Definitions
  • Argument Coercion
  • Storage Classes: auto v. static
  • Scope: global v. local

Chapter 5: Sections 5.1-5.7, 5.12
Ignore: Section 5.11 {Storage Classes) and 5.12 (Scope) -- these sections are very poorly written, and you should follow your class notes instead.

Oct. 19

Functions (cont.):

  • Random Numbers
  • Call by Value v. Call by Reference
  • Introduction to Recursion

Sections 5.8, 5.9, and 5.13
Ignore: Sections 5.14 and 5.15 (advanced recursion examples.)

Oct. 26

Review and Midterm:

  • The Midterm will be held on Wednesday, October 28.

Nov. 2


  • What’s an Array? What are they used for?
  • Declaring Arrays
  • Referencing Array Elements
  • Passing Arrays to Functions
  • Call by value v. Call by Reference (Cont.)
  • Strings

Sections 6.1-6.5
Ignore: Sections 6.7, and 6.8

Nov. 9

Arrays (cont.)
  • Sorting: Bubble Sort
  • Multi-dimensional Arrays (Hunt the Wumpus)
Sections 6.6, 6.9

Nov. 16


  • Computer Memory and RAM
  • What’s a Pointer?
  • Pointer Operators: & and *
  • Limitations of call by value
  • Important example: the swap function

Chapter 7: Sections: 7.1 – 7.4, 7.8

Nov. 23

Pointers (cont.):

  • Pointer Arithmetic
  • How are Pointers and Arrays related?
  • Important example: copying strings
Sections 7.7 and 7.8
Ignore the case study in Section 7.10

Nov. 30


  • Structure Definitions
  • Accessing Members of Structures
  • The Dot Operator
  • Pointing to Structures: The Arrow Operator
  • Creating arrays of structures

Chapter 10: Sections 10.1 – 10.5

Dec 7

File Input/Output:

  • Files and Streams
  • The FILE structure
  • Opening/closing file
  • Reading from files
  • Writing to files

Chapter 11: Sections 11.1 - 11.5
Ignore: The text goes into greater detail regarding the FILE structure. You can safely ignore this. Also, don't worry about random access files. We didn't have time for that.

December 14

Introduction to Java

  • Introduction to Object Oriented Languages
  • Java and the World Wide Web


Final The final will be held on Wednesday, 12/16 8:00-9:50am