July 2015
Intermediate to advanced
380 pages
10h 15m
English
In this exercise, you’re going to make a big leap in difficulty and create an entire small program to manage a database. This database isn’t very efficient and doesn’t store very much, but it does demonstrate most of what you’ve learned so far. It also introduces memory allocation more formally, and gets you started working with files. We use some file I/O functions, but I won’t be explaining them too well so that you can try to figure them out first.
As usual, type this whole program in and get it working, then we’ll discuss it.
ex17.c
1 #include <stdio.h> 2 #include <assert.h> 3 #include <stdlib.h> 4 #include <errno.h> 5 #include <string.h> 6 ...