Random stumbling around in C