I know how rand()
and srand()
are related to each other, and I know how should I use them, but their mechanism of working was really interesting for me and I wanted to know How they really work?!, but I couldn't find any special thing.
So this is my question: What is going on in deep inside of rand()
and srand()
and how does it produce a random number? (If it's really producing a random one!) Does it have any special mathematics calculation or any special algorithm? what is it?