The pseudo-random number generator is initialized using the argument passed as seed.
For every different seed value used in a call to srand, the pseudo-random number generator can be expected to generate a different succession of results in the subsequent calls to rand.
void srand (unsigned int seed);Example:
#include /* printf, NULL */
#include /* srand, rand */
#include /* time */
int main ()
printf ("First number: %d\n", rand()%100);
printf ("Random number: %d\n", rand()%100);
printf ("Again the first number: %d\n", rand()%100);
Java Enterprise Edition (EE)
Java Standard Edition (SE)
RFC (standard status)
RFC (proposed standard status)
RFC (draft standard status)
RFC (informational status)
RFC (experimental status)
RFC (best current practice status)
RFC (historic status)
RFC (unknown status)
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 974 / 159177478. Delta: 0.02609 с