Skip to content

BaseMax/RandStringC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

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
  • ...