I was looking through my code for ScratchPad today and was trying to find ways to improve it. I decided to change all of the calls of scanf to fgets. Can someone post some code to show how to change the result ofto exactly match the result ofCode:fgets(string,sizeof(string),stdin);I want to be able to switch it to fgets without needing to change any more code. I was hoping to make a function that I could run on a string after I use fgets() so that it will look just like scanf was used. Also on the topic of getting rid of scanf, what is the best way to replace this?Code:scanf(" %s",string);Thanks in advance.Code:scanf(" %d",&i);
~Sven