GCTAA Logo

Governor's Career & Technical Academy Arlington

CSC 202: Week 3


Overview

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:

  1. Write and compile a working version of the program on page 69 of our book in a file named mygrep.c and commit this to your git repo. (note:, you'll need to rename getline -- why not call it mygetline? -- to avoid conflict withe the getline function defined in stdio.h).
  2. Draw a finite-state machine representing the process used in mygrep.

Evaluation

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

Classwork

We will begin with a discussion of the next part of chapter 1. Some questions I hope we will explore include:

  1. call by value vs. call by reference
  2. strings in 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:

Since the word count program is an example of a state machine, it provides a nice opportunity to introduce this important concept.

Homework

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.

Evaluation

Come to class on Wednesday prepared to discuss the homework. Your evaluation will be based equally on your git repo and the class discussion.