A simple set of stats functions in C for learning purposes