CSPP 51081 - C Tutoral Page - Fall 2008
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
Week of Sept 29
- 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
Second Week , Upcoming due date: Lab#3
- 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
Third Week, Upcoming due date: Lab#3
- Bitwise operations and operators: | & ^ ~ << >>
- Basics of file I/O
- Command line arguments to main
- macros with arguments
Fourth Week, Upcoming due date: labs#3
- Getting started with the gdb debugger
- ifdef preprocessor directive
- Questions on Makefile
Tutorial 5
Fifth Week, Upcoming due date: Lab#4
- 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
Sixth Week, Upcoming due date: Lab#4
- More Dynamic Memory Allocation: structures, arrays of structres
- realloc and calloc
- Common bugs - memory leaks and memory corruption
Tutorial 7
Seventh Week, Upcoming due date: Lab#5
- Building a stack data structure, using dynamic memory allocation
- file I/O library functions: fopen,,fprintf,fscanf,etc
- static variables and functions
Tutorial 8
Eighth Week, Upcoming due date: labs#5&6
Topics:
- Function Pointers: purpose and syntax
- Using function pointers: sorting, qsort
- Enumerations, enum keyword
prepared by Sonjia Waxmonsky
Posted:10/1/07
Last Updated: 10/25/08