Small test programs in c and c++