CSPP 51081 - C Tutoral Page - Fall 2009
Contact Info
Pavel Krajcevski
pavelk at cs uchicago edu
Useful links
Here's some things you should know but we won't cover fully in the tutorial
If you're new to UNIX, I recommend learning a screen-based text editor such as vi or emacs. Here's a quick vi tutorial and another vi tutorial.
The Lab3 FAQ
has a link to a gdb turorial
Also, here's a lab on the gdb debugger, that I wrote for CS 154 in Spring 2005.
For a howto on Makefiles, see the
Deconstructing Make tutorial also linked from the
Lab3 FAQ
Tutorials
All tutorials will be held in the Computer Lab on the 4th floor of Ryerson
Tutorial 1
Friday of 2nd Week
- main,#include directive
- Data types and typedef
- printf
- function basics - arguments, return type, body
- Control structures (especially, switch and ?:
- Arrays and String, getting started with
Tutorial 2
Wednesday of 3rd Week (Oct 7)
- More on Arrays and Strings (briefly:string library function)
- Pointers - Overview, declaration, * and & operators, what is a segmentation fault
- operator precedence
- Structures, struct (and typedef again), pointers to structs
Tutorial 3
Friday of 3rd Week
- Bitwise operations and operators: | & ^ ~ << >>
- Basics of file I/O
- Command line arguments to main
- macros with arguments
Wednesday of 4th Week
- Getting started with the gdb debugger
- ifdef preprocessor directive
- Questions on Makefile
Tutorial 5
Friday of 4th Week
- Multi-dimentional arrays
- More pointer review, pointers as function arguments
- Dynamic Memory Allocation - purpose, getting started w/malloc
- gdb with running processes processes, attach
Tutorial 6
Wednesday of 5th Week
- More Dynamic Memory Allocation: structures, arrays of structres
- realloc and calloc
- Common bugs - memory leaks and memory corruption
Tutorial 7
Friday of 5th Week
- Building a stack data structure, using dynamic memory allocation
- file I/O library functions: fopen,,fprintf,fscanf,etc
- static variables and functions
Tutorial 8
Wednesday of 6th Week
Topics:
- Function Pointers: purpose and syntax
- Using function pointers: sorting, qsort
- Enumerations, enum keyword
prepared by Sonjia Waxmonsky
updated by Andrew Cone
Posted:10/1/07
Last Updated: 10/07/09