+ 1
Why program is coded as time(0),what does 0imply here.
Time(0)
2 ответов
+ 2
0 is used to tell the program the amount of time computer has been running is that many seconds. the random number is based on how many seconds the program thinks the computer has been on for.
0
so although using srand(time(0)) can be used to get truly random numbers, how truly random are they? For example, if one were to call this method at the same time (in this example, if one were to use this command at 51s) each time would the numbers generated be the same???
If, are the numbers still truly random??