This preview shows page 1. Sign up to view the full content.
Unformatted text preview: at the end of the string do not need to be detected/codedassume the string ends with the last non-white space character. The program is to print the input character string on the right hand side of the output line and the code of the string on the left hand side of the output line, with three spaces between the two. The coded characters in the coded string should be separated by vertical lines. For example, if the input string is This is March 7 , 2007. the output should be |20|8|9|19| |9|19| |13|1|18|3|8| |G|,| |B|J|J|G|.| This is March 7 , 2007. The input file, cleverly named cp40710.txt, will have several strings, one string per line. No string will contain more than 50 characters. Your program should process all of the strings, writing the output to a file named cp40710.out. Your program must include a function whose prototype is void encode(char instring[ ], char outstring[ ]); No global variables are allowed....
View Full Document
- Fall '08