Welcome to the forum, eastgod! ![Cool](https://cboard.cprogramming.com/images/smilies/cool.png)
Eastgod, you'll find we are REAL sticklers for:
1) using int main() in your program. Void main has been non-standard since dinosaurs roamed the earth.
2) using a good (you might say "godly"), indentation style. SO MANY errors are caught immediately, IF (and only if), the code has a good indentation style - where subordinate lines of code, are indented 2-5 char's.
3) always use [code] tags around your code. Otherwise the forum squishes it all out of shape, to save space and improve appearance.
Code tags are on an icon button, in the "Go Advanced" editor only. Highlight your code, click on the code tag icon, and poof! You're done.
If you want to replace a letter, that's very easy to do. If you want to ADD a * to a word, you first have to make sure that you have the room for the extra char you're adding.
Because most strings will have space for 0 extra char's to be added to them. C doesn't waste space like that.
Your example changes hello (5 chars), into h*ello (6 chars), so be careful.
One simple way to do this is to iterate over each letter, and if it's the letter you've chosen to change, change it.
Code:
int i;
char word[6]={"hello"}; //5 letters, and one space for the end of string char: '\0'
char chosenLetter='l'; //change el's
for(i=0;word[i];i++) {
if(word[i]==chosenLetter)
word[i]='*';
}
This is not the only way to do this task, of course.