Count B This program takes one file argument 'file'. It counts the occurence of each pair of characters in 'file' and prints this information (in the form of ascii character code pairs) to the standard output. EXAMPLE > ./countb CountTest1 ( 65, 66) AB 25 ( 66, 67) BC 24 ( 67, 68) CD 23 ( 68, 69) DE 22 ( 69, 70) EF 21 ( 70, 71) FG 20 ( 71, 72) GH 19 ( 72, 73) HI 18 ( 73, 74) IJ 17 ( 74, 75) JK 16 Elapsed time = 0.05 Seconds > CUSTOMIZATION If you wish to change the number of dipthongs outputted, change the number of NOut in the preprocessor found in the "header.h" file. Similary, NMax controls how many characters are read in at once. Increasing this value can improve performance. VALIDATION The program needs a file argument as input or it will crash. Be reasonable about how many characters you want to input at a time. NMax segmentation faults at 10,000,000. This program was tested on CountATest1, CountATest2, CountATest3. EXECUTION SPEED It was also run and timed on the novel Michael Strogoff from Project Gutenberg. The program was found to take between 0.03 and 0.08 seconds with an NOut of 100. Given the short completion times, it was hard to notice improvement in execution speed when increasing NMax. So, I downloaded Swann's Way from project Gutenberg and duplicated its text in vim repeatedly, creating a huge file. Here are the speed results of running the program for increasing values of NMax: NMAx Time (seconds) 1 30.86 10 7.58 100 5.22 1000 4.85 10000 4.89 100000 4.93 1000000 4.94 Unfortunatly, the text file was too large (~90Mb) to include in the archive.