3 ms·
Novice here ... but how do these results give random results? Are the uninitialized memory considered random? Or is there some other source of randomness. It
by TheMagicHorsey 8y ago
Novice here ... but how do these results give random results? Are the uninitialized memory considered random? Or is there some other source of randomness. It seems like a deterministic function to me if the variables are initialized to zero.
- tntn 8y agohttps://en.m.wikipedia.org/wiki/Pseudorandom_number_generator https://en.m.wikipedia.org/wiki/Pseudorandom_number_generato...
- aidenn0 8y agoThey are deterministic.
- TheMagicHorsey 8y agoWhy wouldn't one use some sort of pseudorandom seed instead of just uninitialized memory? Couldn't one sample a clock, image sensor, thermometer or some other sensor that would have a random value to use as a seed? Seems like a part of memory allocated by the compiler might always be zero.
- wahern 8y agoThere's no uninitialized memory. File-scoped variables are initialized to 0 in C.