#include <iostream>using namespace std;string str = "level";for (char c : str) { cout << c;}cout << "\n";for (int i = 0; i < str.length(); i++) { cout << "str[" << i << "] = " << str[i] << "\n";}