Srand Time 0 In Dev C++

  

  • The C Standard Library
  • C Standard Library Resources
TimeSrand unsigned time null

Srand Time 0 In Dev C Free

Don't call srand each time to get your numbers – TJD May 15 '13 at 15:36 3 You probably ought to read the manpage, which explains how these functions work, and provides a working example. 3 days ago  We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand.

  • C Programming Resources
  • Selected Reading

Description

The C library function void srand(unsigned int seed) seeds the random number generator used by the function rand.

Declaration

Following is the declaration for srand() function.

Parameters

  • seed − This is an integer value to be used as seed by the pseudo-random number generator algorithm.

Return Value

This function does not return any value.

Example

The following example shows the usage of srand() function.

Srand Time 0 In Dev C Download

Let us compile and run the above program that will produce the following result −

stdlib_h.htm