This program takes a strings from user and removes all characters in that string except alphabets.
Source Code to Remove Characters in String Except Alphabets
using namespace std;
cout << "Enter a string: ";
for(i=0; line[i]!='\0'; ++i)
cout << "Output String: " << line;
Enter a string: p2'r"o@gram84iz./
Output String: programiz
This program takes a string from user and for loop executed until all characters of string is checked. If any character inside a string is not a alphabet, all characters after it including null character is shifted by 1 position backwards.