Software programs are deterministic, thus you're right that nothing is random unless you plug in a hardware random generator. But of course there are no "higher values generated more than lower values". The distribution is pretty even. For details about the algorithm you could probably get information on the Microsoft VC++ forum. The random functions are part of the standard C library.