I am using Linux random() function to generate random message in CentOS 5.2. I want to reset the seed after 3 random calls. In other words I want the same output in 1st call and the 4th call. Is there any way to set rand() function to initial state ? or can do you know any other functions that I can do it ?
Share
You can simply remember the seed and then use that to reset. Something like this in C: