#include <time.h>
#include <stdlib.h> // or wherever srand and rand live
srand (time (0));
It will initialize the random number based on the current time. So unless you have a battery that is not working, and run the same sequence with the same timing everytime, you will get a different seed.