BaseMax / RandStringC

Tiny program for generate random characters using C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random String C

Tiny program for generate random characters using C

Output

==>9NI3Ex1EkuPgQPrggzJPXueYy
==>442626464025050455522664
==>�6���jϨ"���d~����|�)Ҍ���?��

Check

randString1()

randString2()

When your program multi time runs. You will notice that the production of the random value will be the same. because that ways depends on memory.

randString3()

The printed output does not have a direct rely on memory and time. So you can try it out.

randString4()

There are also some methods that depend on time.

So if they multi time run in a one seconds... Will produce the same numbers.

Ways

The C Programming Language has two function rand(), srand() then used for randomization.

  • time
  • memory
  • /dev/random, /dev/urandom
  • ...

About

Tiny program for generate random characters using C

License:GNU General Public License v3.0


Languages

Language:C 100.0%