CS-2303 Lecture Notes

C-Term 2010

Below are the lecture notes for CS-2303 (System Programming for Non-majors) for this term. Lecture notes will normally be posted shortly before or shortly after each class. Students are responsible for knowing and understanding all of the lectures, even those that they might miss.

Chapter numbers refer to the course textbook, The C Programming Language, by Brian W. Kernighan and Dennis M. Ritchie.

CS-2303 Course Home Page

Some topics in the list are not covered in the textbook. It is in the student’s interest to be sure to attend class and listen carefully to those particular topics.

Note: The PowerPoint versions of the lecture notes include dynamic displays. It is best to view them as a slide show in PowerPoint. The HTML pages are provided for those who do not have access to PowerPoint. They capture the slides but not the appearance, disappearance, and other dynamic changes within any slide.

Date

Topics

D&D
Chapters

K&R
Chapters

Lecture
Notes

Week 0

Introduction

1

1

ppt

html

 

Introduction (continued)

 

 

ppt

html

 

Differences between C & Java

2, 3, 4

2, 3

ppt

html

Week 1

Digression on Loop Invariants

 

 

ppt

html

 

Functions and Interfaces

5

4

ppt

html

 

Scope Rules and Storage

5

2, 4

ppt

html

 

Recursion and Implementation
of Functions

5.7

4

ppt

html

Week 2

Symbolic constants in C

 

 

ppt

html

 

Arrays in C and C++
(with and intro to pointers)

6

5

ppt

html

 

Strings, Arrays, and Pointers

7, 8

5

ppt

html

 

Structures, Unions, Typedefs

 

 

ppt

html

Week 3

Event-driven Simulation

 

 

ppt

html

 

Linked Lists in C and C++

12.5

 

ppt

html

 

Binary Trees and Big “O”
notation

12.7

6.5

ppt

html

 

Hash Tables and Constant
Access Time

 

6.6

ppt

html

 

More about the C
Preprocessor

13

4.4
A12

ppt

html

 

Bit Fields and Bitwise Operations

10.9

2.9
6.9

ppt

html

 

Accessing Files in C

11

8

ppt

html

Week 4

Introduction to C++

18

 

ppt

html

 

Mid-term Exam

 

 

 

 

 

Classes and Objects in C++

19

 

ppt

html

 

Miscellaneous C++ topics

18

 

ppt

html

Week 5

More about Classes in C++

19, 20

 

ppt

html

 

Deeper topics about classes

20,21

 

ppt

html

Week 6

Derived Classes and Inheritance

23

 

ppt

html

 

Operator Overloading

22

 

ppt

html

 

More about Operator Overloading

22

 

ppt

html

 

Polymorphism

24

 

ppt

html

Week 7

“Under the hood” of polymorphism

24

 

ppt

html

 

Templates

25

 

ppt

html

 

Exception Handling

27

 

ppt

html