Question: Write a program in C that prints a 10x10 matrix of random integers (0 - 10000) on screen. Then using shell pipes, sort command and

Write a program in C that prints a 10x10 matrix of random integers (0 - 10000) on screen. Then using shell pipes, sort command and stream redirection, sort this output according to 3rd column and save the sorted matrix in a file named sorted.txt. Save your file as ID-hw1.c (e.g. c1112345-hw1.c). Submit both your C code and terminal commands (as comment lines in your source code).

Sample Run $ ./question3 432 5876 856 7887 ...

9135 17 342 398 ... ...

$ ./question3 [...] $ cat sorted.txt 9135 17 342 398 ...

432 5876 856 7887 ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!