Top-rated recipes tagged "malloc"http://code.activestate.com/recipes/tags/malloc/top/2012-05-15T19:49:34-07:00ActiveState Code RecipesSmall random number generator (C)
2012-05-15T19:49:34-07:00Sachin Joglekarhttp://code.activestate.com/recipes/users/4181845/http://code.activestate.com/recipes/578134-small-random-number-generator/
<p style="color: grey">
C
recipe 578134
by <a href="/recipes/users/4181845/">Sachin Joglekar</a>
(<a href="/recipes/tags/generate/">generate</a>, <a href="/recipes/tags/malloc/">malloc</a>, <a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/stdlib/">stdlib</a>).
</p>
<p>Generates random numbers in a given range using malloc function in stdlib.h. Based on the observation that the memory address allocated during malloc is usually 'random' (for humans). takes in two arguments- start of range, end of range.</p>