Your algorithm for replacing the characters is very close, you're just off by one thing
Code:
int main(void)
char * word_list = "greg.john,steve!julie";
char * punc_mark = "!@#$%^&*(),.<>[]{};':\"";
for ( int wlidx = 0; wlidx < strlen( word_list ); wlidx++ )
{
for ( int pmidx = 0; pmidx < strlen( punc_mark ); pmidx++)
if ( word_list[wlidx]==punc_list[pmidx])
word_list[wlidx]=' ';
}
I changed the strlen( pmidx) to strlen( punc_mark). This way you will traverse all the way through your punctuation mark list.
As far as getting it in and out of a text file, I'll let you figure out that part. Think about reading into an array and then writing from an array.