i am using a text file to store my data records. the data is stored in the following format.
Antony|9876543210 Azar|9753186420 Branda|1234567890 David|1357924680 John|6767676767
Thousands of records are stored in that file. i want to delete a particular record, say "David|1357924680". I am using C, how to delete the particular record efficiently? currently i am using a temporary file to copy the records to that temp file by omitting the record i want to delete. and after copying to temp file, i copy the contents of the temp file to original file by truncating all the contents of the original file. i don't think that i am doing it efficiently. Help me. Thanks in advance.