|
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.
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.
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.
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 macOS
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. On macOS, you may need to run the following command if you don't have Xcode installed: "xcode-select --install".
Windows
You have two options to set-up a terminal environment on Windows, listed below.
Option 1: use the windows subsystem for linux, following the instructions here.
- Notes: you'll have to run powershell in administrator mode, and type "wsl --install"
You can view the directory where your files are stored by opening the Windows File Explorer from the command line terminal, using:
"explorer.exe . "
Option 2: 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.
- 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-16.04.7-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.
- Notes: VirtualBox does not work with Apple Silicon, but
UTM is an alternative. Note that if you use macOS though, you shouldn't need to set-up a virtual machine for this class.
C Resources
C language library
C FAQ
C Programming Exercises
Text Editors
Vim tutorial
Another vim tutorial
Emacs tutorial
Atom tutorial
Unix
Unix tutorial
|
---|