Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #125926
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Ian Collins <ian-news@hotmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: srand |
| Date | Mon, 29 Jan 2018 18:27:17 +1300 |
| Lines | 19 |
| Message-ID | <fd7plmFnvamU2@mid.individual.net> (permalink) |
| References | <5a6eaddd$0$726$14726298@news.sunsite.dk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net a/+cYYTyfXsJe8baVZD4zwTGpvN0LfLGYYG0T3meX6lYe+tsm6 |
| Cancel-Lock | sha1:WDOFsULxxUxZ+UHXAXWPmtHU7vk= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
| In-Reply-To | <5a6eaddd$0$726$14726298@news.sunsite.dk> |
| Content-Language | en-US |
| Xref | csiph.com comp.lang.c:125926 |
Show key headers only | View raw
On 01/29/2018 06:15 PM, G B wrote: > Is there any significant difference between: > > srand((unsigned) time(&t)); > > and > > srand((int) time(null)); Well given "null" isn't defined, yes! A less flippant answer is no, time(NULL) will return the same as time(&t). I don't see the point of the casts (or why they are different), you may as well just write srand(time(NULL)); -- Ian.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
srand G B <gb@gb.com> - 2018-01-29 05:15 +0000
Re: srand Ian Collins <ian-news@hotmail.com> - 2018-01-29 18:27 +1300
Re: srand Keith Thompson <kst-u@mib.org> - 2018-01-28 23:09 -0800
Re: srand Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-01-29 11:32 +0000
Re: srand Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-01-29 08:46 -0700
Re: srand Real Troll <Real.Troll@Trolls.com> - 2018-01-29 17:59 -0400
Re: srand bartc <bc@freeuk.com> - 2018-01-29 22:07 +0000
Re: srand Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-05 12:54 +0000
csiph-web