ashu said:
thank you mlimber, but i want to use this randomly generated character
to name(atleast 3-4 characters) as file (to create a file). so is
there any possible way to get that, may be by some loop.
please answer in source code as you did earlier.
So, you have a much more complicated problem than you first described.
Needing four characters is minor. You need to construct a legal file
name on your particular platform. That means you have to determine what
constitutes legal characters.
For instance, are punctuating characters legal? All of them? Some of
them? Allowed as the first character? Are numbers legal in the first
spot? Are capitals distinct from lowercase?
I'd make up an arrays of legal characters and generate random indexes
into it to get the characters.
Of course, this in no way guarantees unique file names. It would be
good to give us the full problem description as well.
Also, read my .sig below.
Brian