hey everyone, im tryin to generate random strings and store them in an array. can anyone please show me?
darkdai
-1
Light Poster
Recommended Answers
Jump to PostGenerating random strings as a whole is tough ...
You could chose a random length and then chose random chars to fill that length
Jump to PostLook at ASCII table and note the decimal values of chars you want to randomize. Then randomize values, then print them with using "%c" placeholder. For example;
char example = 97; int exapmleinteger = 97; printf("%c", example ); printf("%c", exampleinteger );
will both output 'a'.
All 6 Replies
abhimanipal
91
Master Poster
darkdai
-1
Light Poster
Tellalca
19
Posting Whiz in Training
Aia
1,977
Nearly a Posting Maven
darkdai
-1
Light Poster
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.