Systems Programming - Examples and Exercises
This page contains some examples and problems for the Systems
Programming course.
- wordcount: Write a C program
called wordcount that counts the words in the standard
input. A word is a sequence of one or more characters
delimited by white space. (Hint: there is a standard
function to check whether a character is "white space".) The
output should be the same as the command:
wc -w
- radix256 tree: Implement
a radix-256 tree whose API is defined by this header
file: radix256_tree.h. Also write a
program to test your implementation.
- six degrees of Renato
Pozzetto: Implement a program that reads and processes a
movie/actor graph, and can answer queries about Renato Pozzetto
(or any other actor, really). The graph is defined by
the IMDB data files
whose format is
described here.
You program must take the name of a central actor as a
command-line parameter (default is Renato Pozzetto). The program
must also take the name of the tab-separated files that define the
graph (default are name.basics.tsv, title.basics.tsv,
title.principals.tsv). The program must then answer queries read
from the standard input. A query could be the name of an actor,
in which case, the program must find a sequence of movies and
other actors that "connect" that actor to the central actor.