#include <stdlib.h>int rand(void);
The rand( ) function generates a sequence of pseudorandom numbers. Each time it is called, an integer between zero and RAND_MAX is returned. RAND_MAX will be at least 32,767.
A related function is srand( ).