string s; cout >> "Введите слово: "; cin >> s; cout << s.size();
жбан
string s = "инф"; string s = "aaaaа"; s = s + q; cout << s;
string s = "ксе"; string s1 = "во"; string s2; s2 = s1; s2 = s2 + s; s2 = s2 + "ль"; s2 = s2 + s1; cout << s2;
string s = "информатика"; cout << s[3];
string s = "кибернетика"; cout << s[strlen(s)-6];
string s = "космонавтика", s1; s1 = s.substr(2, 3); cout << s1;
string s = "галактика"; string q = s; q = q.substr(0, 2); cout << q;
string s = "планшет"; strint q = s.substr(4); cout << q;
string s = "абвгдежзик"; string q = s; q.erase(1, 2); cout << q;
string s = "абвгдежзик"; string q = s; q = q.substr(0,6) + "..."; q = q + s.substr(9); cout << q;
string s = "монитор"; string q = s.substr(1, 5); cout << q;