■ Returns successive pseudo-random numbers in
the rangę from 0 to RAND_MAX
■ Example:
#include <stdlib.h>
#include <stdio.h> int main()
{inti;
printf("Ten random numbers from 0 to 99\n\n"); for(i=0; i<10; i++) printf("%d\n", rand() % 100); return 0;
}
■ Sets the random generator to a new starting
point, e.g. the current time
■ Example:
#include <stdlib.h>
#include <stdio.h> int main(void)
{ srand(10);
printf("%d\n", rand() % 100);