How to replace a word at a parcitular line

Could someone tell me how to replace a word at a particular line by a single SED or AWK command?

e.g. I have a file with the contents below:

$ cat file1
111 AAA
333 CCC
222 BBB
444 CCC

I want to replace the word "CCC" with a blank to get the desired output below:

111 AAA
333 CCC
222 BBB
444

I can get the above by the command below but I want it to work for any line using simpler commands.

paste -s file1 | sed -e s/CCC$// | tr -s '\11' '\12'

Any help will be appreciated.

Steve

If the pattern is in the last line of file

sed "$ s/CCC$//" file

If you know the line number of pattern

sed "4 s/CCC$//" file

in perl:

perl -pi -e 's/CCC// if m/^444/' filename

replace 444 with the number present on the line where you want to do the change

Perfect!
Thanks guys!

Cheers
Steve