Uh - you need to allocate STORAGE for b.
As you have it, both a and b are READ-ONLY.
main(int argc, char *argv)
n_changes = capitalize("programming in C", b);
printf("the number of changed chars is: %d, the updated string is: %s\n",