What is the srand() function from the standard library used for?
The rand function will constantly return the same sequence of random numbers. This is convenient only at the debugging stage. In order for the sequence to be different all the time, when starting the application, you need to specify seed - this is achieved by calling srand. See srand().

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Зарегистрируйся сейчас
или Подпишись на будущие тесты