Sample Question #21 (programming)
I give you a text file, x.txt, which has millions of records with three columns in each record:
ID, age, income
The records are sorted by ID, and no two IDs are the same.
Now, write a short program in each of the following languages to pull out 10,000 randomly selected records from x.txt. Put these 10,000 randomly pulled records in an output file called y.txt.
- Visual Basic
- R or S-Plus
- UNIX shell script
(Comment: how many programming languages do you know?)