. 2. Write a CH program that reads characters from the file mess.txt and sorts them into letters, digits, and symbols, t
Posted: Wed Apr 27, 2022 3:38 pm
. 2. Write a CH program that reads characters from the file mess.txt and sorts them into letters, digits, and symbols, then prints them neatly into a new file sorted.txt. Assume the number of characters in the file is unknown. Hints: use isdigit(c) to check if c is a digit use isalpha(c) to check if c is an alphabet • everything else is a symbol use the following lines to reset your ifstream pointer to the beginning of the file fin.clear(); finaseekg(0, ios::beg); . . Sample Output: sorted.txt Letters digits symbols f 2 95 j 8 ? f 7 H 4 & P 8 D Q N ONOCO *REP IQ OZ