Is it good idea to pass uninitialized variable to srand
instead of result of time(NULL)
?
It is one #include
and one function call
In the first case there are two possibilities:
time(NULL) returns the time of the system which is 99.99% different every time you run the code.
Nothing is perfect random, but using time(NULL) gives you a "more random" number then if you would use the first approach.
You should check function's usage http://www.cplusplus.com/reference/cstdlib/srand/