A Better Seed For Random Number Generation Than The Current Time | C Programming Example

Portfolio Courses
Portfolio Courses
4.5 هزار بار بازدید - 3 سال پیش - In C programming it is
In C programming it is common to see time(NULL) used as the seed to the random number generator. This can cause a program to produce the same sequence of random numbers if it is run multiple times in the same second. In this video we learn how to incorporate the process ID into the seed number to ensure this does not occur. Source code: github.com/portfoliocourses/c-example-code/blob/ma…. Check out www.portfoliocourses.com/ to build a portfolio that will impress employers!
3 سال پیش در تاریخ 1400/11/17 منتشر شده است.
4,534 بـار بازدید شده
... بیشتر