How can I asign a random values to an array without repeating the value. Please help.

How can I asign a random values to an array without repeating the value. Please help.

This is a discussion on How can I asign a random values to an array without repeating the value. Please help. within the C Programming forums, part of the General Programming Boards category; Dear everyone,
For those who replied on my thread, thank you so much. I was not able to visit this ...

Thank you everyone! It's a big help.

Dear everyone,

For those who replied on my thread, thank you so much. I was not able to visit this site for a while that's why I am surprised to have many replies from you all, actually my last reading is on Mr. King Mir reply, that's why I clicked his link Shuffleing algorithms can be found on Google, and I visited one of the site and I tried to apply its code, here it is (with some little modifications):

And it works, although it seems that the same arrangement of randoming numbers we're encountered, but at least there were no more repeating value encountered, that is, no more two 4's, three 5's, etc. (may be it's because I initialized them before I shuffled it). As I have read again this thread, I guess this what's laserlight is telling beforehand, to "populate" first the array, then do the shuffling.

But nevertheless, I am already contented with the result. I'll try everyones codes as another workarounds in this related problem. Any way, any more tutorial on what this rand() function? I know it's a randoming function, but I want to know about it more.