This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

max value for seed for srand() function

In Keil's functions, the value for the seed value for srand() is 'unsigned int' according to their function definition.  Which for my processor is 4 bytes - sizeof(unsigned int) = 4.  However, it looks like the higher 2 bytes are ignored (seed value of 0x00001234 produces the same random numbers as 0x00011234 and all other values of the top 2 bytes).  So, is it really just 2 bytes or 65535 the largest seed value and not based on the size of 'unsigned int' of your processor?  Which I read online in other forums as the norm.  Thanks.

Sutton

0