#include <string> #include <iostream> using namespace std; int main() { string str( "hello" ); char ch = str[0]; str[0] = 'j'; ch = str. at( 0 ); str.at(0) = 'h'; ch = str[ 1000 ]; return 0 ; }