program to capitalize each first letter of the word c++ code example Example: capitalize first letter c++ string str = "something"; str[0] = toupper(str[0]);