Course Notes for Computer Science 430

C and UNIX

Spring 1997


Tim Wahls
office: E-258K Olmsted
phone: 948-6085
email: wahls@psu.edu

Sample student programs are now available! See the directory: ~taw2/pub/student or the link at section VII of this page

Final Exam

Table of Contents

  1. Course Syllabus
  2. Course Policies
  3. UNIX and C resources page created by Dr. Bui
  4. Frequently Asked Questions page for the Sun Cluster
  5. FTP and Telnet Software for Windows 95
  6. Assignments
    1. Assignment 1
    2. Program 1
    3. Program 2
    4. Program 3
    5. Program 4
    6. Program 5
    7. Program 6 (extra credit added 3/19/97)
    8. Extra Credit Assignment
    9. Program 7
    10. Program 8
    11. Program 9
  7. Example Student Programs
  8. Introduction to UNIX
    1. UNIX Basics
    2. Creating and Editing Files with vi
    3. Basic UNIX Commands
    4. The UNIX File System
    5. Protection Modes
  9. C Basics
    1. Compiling C Programs
    2. General Structure of a C Program
    3. Comments in C
    4. Variable Declarations
    5. Types for Variables
    6. Assignment Statements
    7. Constants
    8. Arithmetic Operators and Expressions
    9. Type Casting
    10. Precedence and Grouping
    11. Shortcut Operators
    12. Using Electronic Mail
  10. Flow of Control
    1. Boolean Expressions and Operators
    2. Relational (Comparison) Operators
    3. Boolean Operators and Compound Boolean Expressions
    4. if Statements
    5. if Expressions
    6. switch Statements
    7. for Loops
    8. while Loops
    9. do while Loops
    10. Using break and exit()
  11. Functions
    1. Function Calls
    2. Standard (Built-in) Functions
    3. User Defined Functions
    4. Program Format
    5. Pass-by-Value Parameters
    6. Pass-by-Address Parameters
    7. The return Statement
    8. Scoping Rules
  12. UNIX Commands
    1. File Information
    2. Other Information
  13. Input/Output
    1. Using printf()
    2. Using scanf()
    3. Text Files
    4. Reading and Writing Text Files
    5. Standard Files
    6. File Processing
    7. UNIX Input and Output
  14. Arrays
    1. One-Dimensional Arrays
    2. Multidimensional Arrays
    3. Declaring New Types
    4. Initializing Arrays
    5. Advice on Using Arrays
  15. Strings
  16. Structures
    1. Structs and Functions
    2. Nested Structs
    3. Other Declaration Methods
  17. Dynamic Memory Management
    1. Allocating Memory
    2. Sizing Arrays at Runtime
    3. Linked Lists

Exams from Spring 1996:

Exams from Fall 1996:

Current Exams:

And some fun: a link to a Top Ten list of reasons for learning UNIX and C.

Disclaimer