LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-09-2009, 04:09 PM   #1
dreamlemon
Member
 
Registered: Feb 2007
Distribution: debian ,OBSD ,Slackware
Posts: 37

Rep: Reputation: 15
rand and array


Hello programmers,
Can you teach me how to
select one element from an array via random order
then finally all the elements of that array are used(selected) once.
For example,there is an array
{ 2,4,6,8 }
I may need the following selection.
2,6,8,4 or
4,8,6,2 and so on.
How to do this in C?
I also use TCL.
If you can program this in TCL
I will be grateful to this
 
Old 07-09-2009, 06:26 PM   #2
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
Please forgive the assumption, but is this a homework assignment?
Most folks here would ask that you at least give it a try, and post what you've tried (enclosed in code tags, please).
Even if it isn't homework, I think you'll find folks far more willing to help if you show an attempt at it ... that helps us gauge what level of help you might need.
Most of us here can show you some simple and elegant methods for accomplishing the task in C, I'm not all that great with TCL but I get by, other folks here are certainly better.
 
  


Reply

Tags
programming


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rand() function in linux ko589 Programming 6 04-28-2009 08:48 AM
using rand in matlab lmvent Programming 10 02-23-2009 04:35 PM
LXer: Mono and RAND LXer Syndicated Linux News 0 05-28-2008 11:20 AM
rand() question deiussum Programming 6 11-11-2004 02:10 PM
Need help using rand() in C KneeLess Programming 12 10-01-2003 12:51 PM


All times are GMT -5. The time now is 07:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration