Answers for "how to genrate a random number in C"

C
5

how to genrate a random number in C

#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.
Posted by: Guest on June-18-2020
0

how to genrate a random number in C

srand(time(NULL));
  int r = rand();
Posted by: Guest on June-18-2020

Code answers related to "how to genrate a random number in C"

Code answers related to "C"

Browse Popular Code Answers by Language