rand
random number generator
Synopsis
#include <stdlib.h>
int rand(void);
Description
The
function returns a pseudo-random integer value in the range
rand
15
[0, 2
– 1].
For this function, the measure of randomness is its periodicity, the num-
ber of values it is likely to generate before repeating a pattern. The output
of the pseudo-random number generator has a period in the order of
15
2
– 1.
Error Conditions
The
function does not return an error condition.
rand
Example
#include <stdlib.h>
int i;
i = rand();
See Also
srand
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
C/C++ Run-Time Library
3-109
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers