. 2. Write a CH program that reads characters from the file mess.txt and sorts them into letters, digits, and symbols, t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

. 2. Write a CH program that reads characters from the file mess.txt and sorts them into letters, digits, and symbols, t

Post by answerhappygod »

2 Write A Ch Program That Reads Characters From The File Mess Txt And Sorts Them Into Letters Digits And Symbols T 1
2 Write A Ch Program That Reads Characters From The File Mess Txt And Sorts Them Into Letters Digits And Symbols T 1 (38.49 KiB) Viewed 26 times
. 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply