-bash-4.2$ ./ptrtest2 data1.txt 12 3 Processing first 12 values from data1.txt. first 6 values: 406.94 198.63 961.99 238.36 910.21 188.81 last 6 values: 188.81 467.37 639.60 125.10 581.16 144.50 all values in sorted order: 125.10 144.50 188.81 198.63 238.36 354.07 406.94 467.37 581.16 639.60 910.21 961.99 -bash-4.2$ ./ptrtest2 data1.txt 25 5 Processing first 25 values from data1.txt. first 12 values: 406.94 198.63 961.99 238.36 910.21 188.81 467.37 639.60 125.10 581.16 144.50 354.07 last 13 values: 812.45 716.26 150.35 753.40 387.70 491.69 788.64 624.17 263.02 545.16 908.81 829.42 620.95 all values in sorted order: 125.10 144.50 150.35 188.81 198.63 238.36 263.02 354.07 387.70 406.94 467.37 491.69 545.16 581.16 620.95 624.17 639.60 716.26 753.40 788.64 812.45 829.42 908.81 910.21 961.99