This program counts pairs of characters in batches of NMax and outputs the NOut top pairs with their counts. NMax: the number characters that the i/o take from file each time. NOut: the number of pairs to print sorted from high to low count. ============================================ INPUT: Characters ============================================ OUTPUT: ("char1", "char2") "count" . . . . . . . . . . . . . . #.###### seconds elapsed to finish the job. =========================================== SAMPLE ON FILE: File: Great Expectations Source: Gutenburg project Charecters count: More than 992924 Time elapsed to finish counting pairs: 0.035940 seconds NMax = 1 NOut = 20 ========== OUTPUT FROM PROGRAM =========== (e, ) 26776 ( ,t) 22480 (d, ) 20251 (t,h) 19756 ( ,a) 19204 (h,e) 19078 (t, ) 16954 (,, ) 14475 (i,n) 14142 (e,r) 13291 (s, ) 13246 (a,n) 12766 ( ,h) 12469 ( ,w) 12128 ( ,s) 11278 (n,d) 10869 (n, ) 10783 (h,a) 10057 ( ,o) 9976 (r,e) 9793 0.035940 seconds elapsed to finish the job. =========================================== ==== output with different NMax sizes ===== NMax = 1 Time = 0.035940 seconds ----------------------- NMax = 10 Time = 0.035686 seconds ----------------------- NMax = 1000 Time = 0.028271 seconds ----------------------- NMax = 100000 Time = 0.029047 seconds ----------------------- NMax = 1000000 Time = 0.029768 seconds