•
Exercise 4: Use template program lab11d.c. This code has a number of problems, and it is not
clean, easy-to-work-with code. Here's what it is supposed to do:
? It should generate REP lines of output.
? Each line of output should contain SIZE_OF_SAMPLES "random" numbers, and the
numbers in that line should all be unique, i.e., there should be no duplicate values in any
one line of output.
? Each random number should be in the range of 0 to MAX (inclusive).
Note that the random number generator is given a constant seed via the call to srand (9808),
so each time the program runs, the same sequence of "random" numbers will be generated.
With REP having value 5, SIZE_OF_SAMPLES having value 3, and MAX having value 6, all as
given to you in the program, the final output should be:
>>> Running program
6 5 1
0 2 6
2 4 3
2 0 3
6 5 0
>>> Program exited with exit code 0
When you initially run this program, it seems to run forever, with no output. There is more than
one bug in this program.
? Identify and fix these bugs.
? Complete the Exercise 4 questions on the lab report form.