Problem description
Some software will often require users to enter a random password (or check code) sent by a system to verify the identity of the user and prevent malicious login.
Requires C language to generate a set of 6-bit random cipher strings.
Introduction to the RAND function
The RAND function is a true random number generator, which returns a range of random values between 0 and Rand_max (2147483647).
The function is prototyped as: int rand (void);
When using this function, include the header file "Stdlib.h".
C Code Implementation
Makefile File Contents
Testrand:testrand.c
gcc-c-G TESTRAND.C
gcc-g-o RELEASE/TESTRANDTESTRAND.O
RM *.o
generation of random passwords
After executing the "make" command, go to the "release" Directory and execute the "Testrand" name, and the resulting random password is as follows:
289383
930886
692777
636915
747793
238335
885386
760492
516649
641421
202362
490027
368690
520059
897763
513926
180540
383426
089172
455736
(I Weibo: Http://weibo.com/zhouzxi?topnav=1&wvr=5, No.: 245924426, welcome attention!) )
C code implementation for generating random passwords