I'd like to remplace every 'c' in my char array into 'a'

did something like

Code:
while(*str!='\0')
{
    if(*str=='c')
       //thought i could do *str='a' but i guess i cannot
    *str++;
}
how can i do so? sorry for my newbieness