COMP 211: Principles of Imperative Computation
Sections 1 and 2, Spring 2019
         Home Schedule Policies Resources         

Required textbooks

Used copies of the books below should be easily found on Amazon. Depending on your budget, you may choose to buy only one of the C programming books.

C Programming Language: C
2nd Edition (1988) by Brian W. Kernighan, Dennis M. Ritchie
This is the classic book on the C programming language and is an excellent resource.
Price: Rent from $15.47, buy from $32.90.

Programming in C: C2
4th Edition (2014) by Stephen G. Kochan
This book is primarily an alternative reference for those who find the Kernighan and Ritchie book too terse.
Price: Rent from $14.40, buy from $31.98.

Algorithms in C, Parts 1-4: A
3rd Edition (1999) by Robert Sedgewick, errata
We will not even begin to cover everything in this book, but it will provide you additional background on the topics we do cover and should be an excellent resource as you continue learning computer science in subsequent classes.
Price: Rent from $26.99, buy from $40.95.


Your C environment

Note that the lab computers are Mac OS: if you do not have a laptop, or use Windows but do not wish to create a virtual machine, then one option is to use a lab computer. Since the computers are wiped daily, you should make sure to copy any files saved there back to your Wesleyan file directory, email them to yourself, or save them to a USB stick.

Linux or Mac OS
Open a terminal and you should be all set. To check that you have a C compiler and to double-check the version please type the command "gcc --version" in a terminal.

Windows
The preferred option is to create a Linux Virtual Machine (VM) using VirtualBox. If you find you are having trouble doing this, please bring your laptop to my office and we will set it up together. An alternative option is to use a terminal emulator for windows such as cygwin and install gcc, directions here.
  • Step 1. Download and install the most recent version of VirtualBox. VirtualBox is virtualization software that runs on your computer and permits you to run a virtual computer on your computer, in your case, a computer running Linux rather than Windows. You should read the beginning of Chapter 1 (First Steps)
    before continuing.

  • Step 2. Download a linux iso. Go to the Ubuntu website and download this version: ubuntu-14.04.4-desktop-amd64.iso

  • Step 3. Create your linux virtual machine following the instructions here and choosing the following options.

    Type: Linux
    Version: Ubuntu (64-bit)
    Memory size: 1024 MB
    Create a virtual hard disk now: create
    VDI (VirtualBox Disk Image)
    Statically allocated
    File location and size: 20 GB

  • Step 4. I recommend also installing guest additions to make using your virtual machine easier. Follow the instructions here.


C Resources

C reference

C language library

C FAQ

C Programming Exercises


Text Editors

Vim tutorial

Another vim tutorial

Emacs tutorial

Atom tutorial


Unix

Unix tutorial