srand48((long int) atoi(argv[2])); Does this mean that srand48 will seed using a long and an int? }
else
{ srand48((long int) time(NULL)); returns the number of seconds since epoch.. so basically time elapse?????
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communitysrand48((long int) atoi(argv[2])); Does this mean that srand48 will seed using a long and an int? }
else
{ srand48((long int) time(NULL)); returns the number of seconds since epoch.. so basically time elapse?????
srand48((long int) atoi(argv[2])); Does this mean that srand48 will seed using a long and an int?
yes. long int is basically a longer version of int
srand48((long int) time(NULL)); returns the number of seconds since epoch.. so basically time elapse?????
time(null) is now and epoch (Jan 1, 1970). So it is the time elapse from epoch to the current time