Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

random number c

//Note: Don't use rand() for security. 

#include <time.h>
#include <stdlib.h>

srand(time(NULL));   // Initialization, should only be called once.
int r = rand();      // Returns a pseudo-random integer between 0 and RAND_MAX.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #random #number
ADD COMMENT
Topic
Name
1+5 =