After the name is enterd, and the user presses enter, the window closes without doing the other things.Code:#include <iostream> using namespace std; int main() { char name[20]; cout<<"Please enter your name: "; cin>> name[20]; cin.ignore(); cout << "\n" <<name<< "" <<endl; cout << "Press enter to exit" << endl; cin.ignore(); return 0; }