Srand Time Null Dev C%2b%2b

Srand time null dev c 2b 2b c

  1. Srand Time Null Dev C 2b 2b Download
  2. Srand(time(0)) C++
  3. B X 2b
  4. 2b 2b Apartments
2003-03-20 00:11:03 UTC
Hi!
friends...i have got a doubt...
how to use srand() function. how to define the seed for this.
suppose i want to generate a random number between 0 and 10. then what seed should i use...
though rand() function works fine....i just wanted to know the difference beween srand() and rand()...
_____________________________________________________________
Get email for your site ---> http://www.everyone.net
_____________________________________________________________
Select your own custom email address for FREE! Get ***@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag

Srand Time Null Dev C 2b 2b Download

Time

Srand(time(0)) C++

Null
  • Let’s just start from the beginning, as you know that computer generates pseudorandom numbers not truly random since they are based on some formula designed by the programmers. And based on that formula computer generates set of random numbers as.
  • The pseudo-random number generator is initialized using the argument passed as seed. For every different seed value used in a call to srand, the pseudo-random number generator can be expected to generate a different succession of results in the subsequent calls to rand. Two different initializations with the same seed will generate the same succession of results in subsequent calls to rand.
Srand Time Null Dev C%2b%2b

B X 2b

Null

2b 2b Apartments

Srand(time(NULL)); Since srand is a void function, it is a function call that does not. Srand in c or c doesn't really Generate Random Numbers?