rand()
Generates a pseudorandom number. A more secure version of this function is available, see rand_s.
int rand( void );
Return Value
rand returns a pseudorandom number, as described above. There is no error return.
Remarks
The rand function returns a pseudorandom integer in the range 0 to RAND_MAX (32767).
Use the srand function to seed the pseudorandom-number generator before calling rand.
Requirements
<stdlib.h>
Example
srand()
Sets a random starting point.
void srand(
unsigned int seed
);
|
Parameters
seed
Seed for random-number generation
Remarks