array capitalize all letters in C++ code example Example: uppercase capitalise character in string c++ str[i] = toupper(str[i]);