random i/o

Jonas Heyman jonas at lkbpyr.UUCP
Wed Nov 29 02:27:31 AEST 1989


Hello,

I have a problem concerning random i/o.
I want to get random numbers from a file that I read from disk.
The file looks like:    40
			43
			44
			50     # numbers between 40-99 
			51
			.
			.
How do I access the file and pick a number randomly.
I should only pick number that exist in the file,
for instance 43 the first time and then 51 the second time and so on.

Is there a simple solution to this ?
Be glad for some help. 

Sincerely Jonas,

-- 

  jonas at lkbpyr.lkb.se 



More information about the Comp.lang.c mailing list