Question: Is it possible to reverse an array without affecting the special characters ? By special characters, I mean anything characters not included from 'a' to 'z' and 'A' to 'Z'. I am short of ideas to build the algorithm, I still haven't it figured out.

Answer: 
```
        Console.WriteLine("enter any string");
        string str = Console.ReadLine();
        string[] revstr = new string[str.Length];
        for (int i = 0; i < str.Length; i++)
        {
            int ch = Convert.ToInt16(str.ToLower()[i]);
            if ((ch < 97 || ch > 122))
            {
                revstr[i] = str[i].ToString();
            }
        }
        for (int k = str.Length - 1; k >= 0; k--)
        {
            int ch = Convert.ToInt16(str.ToLower()[k]);
            if (!(ch < 97 || ch > 122))

            {
                for (int j = 0; j < str.Length; j++)
                {
                    if (revstr[j] == null)
                    {
                        revstr[j] = str[k].ToString();
                        break;
                    }
                }
            }
        }
        for (int s = 0; s < revstr.Length; s++)
        {
            Console.Write(revstr[s]);
        }

```
If you want the position of the special characters to remain the same and the rest of the string to be reversed then this should work -

```
#include <iostream>
using namespace std;

void swap(char& a, char& b)
{
    char temp = a;
    a = b;
    b = temp;
}

int main()
{
   string s = "Hell$o World"; 
   for(int i = 0, j = s.length() -1;i < s.length()/2; i++, j--) {
       while((s[i] <= 'a' && s[i] >= 'Z') || s[i] >= 'z' || s[i] <= 'A') {
           i++;
       }
       while((s[j] <= 'a' && s[j] >= 'Z') || s[j] >= 'z' || s[j] <= 'A') {
           j--;
       }
       swap(s[i], s[j]);
   }
   cout << s << endl;     //dlro$W olleH
   return 0;
}

```