A Better Seed For Random Number Generation Than The Current Time | C Programming Example
5.9K views on YouTube
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: https://github.com/portfoliocourses/c-example-code/blob/main/seed.c. Check out https://www.portfoliocourses.com to build a portfolio that will impress employers!