title: Find and replace function
body: <p>I am looking to create a C function in which it will search a file based on a user entered entry and be able to replace what was there. I have seen similar c++ examples but I don't know c++ very well. Any suggestions or sample code to help me get started would be amazing. My understanding is I need to open the original file for reading, open a new file for writing, read orig file one line at a time, write that line to the new file, and when done, delete the original file, and rename the new file with the original file's name.</p>
  
  <p>Any suggestions or sample code with an explanation would be most helpful</p>
  
  <p><strong>EDIT</strong> Upon further research, I was thinking if I could figure out a way to fread the file, search the file, make the change, and the fwrite it back to the file it would be much much easier.</p>