Also never use a function that doesn't limit the number of characters it will try to retrieve (such as the extraction operator) when using C-strings. First prefer C++ strings over C-strings. If you must use C-strings then either use getline(), which limits the number of characters retrieved or use the setw() manipulator to limit the number of characters it will try to retrieve: std::cin >> std::setw(40) >> a;
By the way, even in small examples like this, you should be using meaningful variable names and it is best to avoid antiquated constructs such as "#include <conio.h>", let this anachronism retire into history. Instead use modern constructs such as std::cin.get() instead.