#include <iostream>using std::cout;using std::cin;using std::endl;#include <cstring>using std::strlen;int main(){ char *s = new char[100]; cout << "Enter the string: "; cin.getline(s, 100); cout << s[strlen(s) - 2] << endl; delete[] s; return 0;}
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include <cstring>
using std::strlen;
int main()
{
char *s = new char[100];
cout << "Enter the string: ";
cin.getline(s, 100);
cout << s[strlen(s) - 2] << endl;
delete[] s;
return 0;
}