This week we really will complete Chapter 1: A Tutorial Introduction from The C Programming Language.
Friday, January 24th
Ah Love! could you and I with Fate conspire
To grasp this sorry Scheme of Things entire,
Would not we shatter it to bits -- and then
Re-mould it nearer to the Heart's Desire!
-- Omar Khayyam
Classwork / Homework
We will start with a discussion of any remaining questions from Chapter 1: A Tutorial Introduction, and then move on to Chapter 4: Functions and Program Structure in The C Programming Language.
By next Tuesday, you should:
- Write and compile a working version of the program on page 69 of our
book in a file named
mygrep.cand commit this to your git repo. (note:, you'll need to rename
getline-- why not call it
mygetline? -- to avoid conflict withe the
getlinefunction defined in
- Draw a
finite-state machine representing the process used in
You will be evaluated on your git repo, your finite-state machine diagram, and how well prepared you are for discussion next Tuesday.
Wednesday, January 22nd
We will begin with a discussion of the next part of chapter 1. Some questions I hope we will explore include:
- call by value vs. call by reference
stringsin C - character arrays
We will also share Conor's question from last week about How to use the Editor Vim as an Hex Editor.
Here are a few links for websites I found useful for a first introduction to finite-state machines:
- The Rise of the State Machines
- Understanding State Machines
- Finite-State Machines
- Count words in a given string
Since the word count program is an example of a state machine, it provides a nice opportunity to introduce this important concept.
As time allows, continue working through Chapter 1: A Tutorial
Introduction in The C Programming Language, trying all the examples
and completing all the exercises and adding them to to your
csc202 git repository.
Come to class on Wednesday prepared to discuss the homework. Your evaluation will be based equally on your git repo and the class discussion.