I need the command to generate random number in c for security and encryption purpose and I need it urgently. Guys help me in this and tell me the command. Thanks.
Command To Generate Random Number In C Needed
If you want to generate random number in c for security or encryption purpose, you can use the following commands lines-
#include<time.h>
#include<stdlib.h>
srand(time(NULL));
int r = rand();
The command returns pseudo random integer between 0 and RAND_MAX. As an option you can use Rand() but it’s not secure enough for the purpose you need. It should be used only one in command.