Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
SRAND it's used to initialize the pseudo-random number generator using a "seed" passed as argument. 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. ex. srand(time(NULL)); int v = rand() % 100; // random from 0 to 99
14th Mar 2017, 11:58 AM
AtoMX
AtoMX - avatar