Do you really want to send r00k123 a message saying you like their work?
#include <stdlib.h>
int rand( void );
This function returns a pseudorandom integer in the range 0 to RAND_MAX (a macro defined in stdlib.h.
See also: srand().
Back to Essential C Functions.