How to create a function, which on every call generates a random integer number? This number must be most random as possible (according to uniform distribution). It is only
If I write man rand, I can read a possible example, given in POSIX.1-2001, for implementing rand() and srand(). See e.g. here. If you need something more sophisticated, take a look at GNU Scientific Library; you can of course download the code and see the implementation(s).