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 Postdarkdai> my_string="abcdefghijklmnopqrstuvwxz"; //these are my random chars
Doesn't look very random. In fact, it has the same pattern that ABC's, except missing the 'y'yes, i know i need a length.
for example:my_string="abcdefghijklmnopqrstuvwxz"; //these are my random chars char list[10]; //the array where i want to store …
Jump to Postim tryin to generate random strings and store them in an array. can anyone please show me?
It's easy if you really want random (pseudorandom) strings from a source:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> void random_fill(char s[], size_t n, const char *src) { size_t …
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.