0

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?????

2
  • Isn't someone answering you in Slack right now?
    – i_am_david
    Commented Jul 30, 2015 at 1:53
  • yes right after I press submit Commented Jul 30, 2015 at 1:56

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .