Some specifics for statistical computing in C :
You should avoid writing your own random number generators --- you will definitely be wasting time 'reinventing the wheel', are likely to make mistakes, are likely to write less efficient code and are probably not using the state of the art random number generators. Simply use R random number generators by linking directly to the R libraries in the following way:
Add the following to the top of your C program:
#include "matrix.h"
#define MATHLIB_STANDALONE 1
#include <R.math.h>
and compile your program foo.c as follows: gcc -o foo foo.c -lm -lRmath

Of course, this assumes that you already have R installed in the right place on your machine.

For matrix operations, a well established set of libraries is lapack
For sparse matrix operations, an excellent option is TAUCS