C - Replacing words
问题 My goal here is to read text from a file redirected from stdin, then replace certain argv passed words with the word "Replaced". For example, if I run: $ ./a.exe line < input.txt where input.txt is "Test line one", at the end I should print "Test Replaced one." I'm not quite sure where my code is going wrong, sometimes I get segmentation fault, and I'm also not sure how I would go about printing the newOut string, or if I even need one. As a side note, if I was reading using fgets, what if