Load the file into MS word or similar large word processor, then select "search and replace" and replace "000" with "0" and "111" with "1". Sometimes the best tool is the one you already have. -Roman ali dawji wrote: > > Dear Sir. > I am a new beginner in c language, and I have a problem as follow: > I have a file (f1.txt) with data for example: > > 000111111000111000000000111111000??? > > I want to read this file and save the result in other file, called (f2.txt), > the reading procedure is as follow: > 1-every three zeros change to one 0. > 2-every three ones change to one 1. > So the result of the file (f2.txt) should be as: > 01101000110? -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads