title: Creating a Palindrome String Checker C++ using Arrays and No Pointers
body: <p>Sorry if this seems really noobish and all, and the fact is, i've only been studying this for about a month now. I can't seem to get this to work right, wondering if any of you can help me out. The program once compiled only says that the inputted words are "not palindrome" even if they are.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstring&gt;
  #include &lt;string&gt;
  using namespace std;
  
  bool isPal (char[], int);
  
  int main ()
  {
    const int size = 10;
    int flag = 0;
    char arr[size];
  
    cout &lt;&lt; "Enter Word\n";
    cin.getline(arr,10);
    flag = isPal(arr, size);
  
    if (flag == true)
      cout &lt;&lt; "Word is Palindrome\n";
    else
      cout &lt;&lt; "Not Palindrome\n";
    return 0;
  }
  
  bool isPal (char arr [],int size)
  {
  int q = 0;
  char arr2[size];
  for (int i = 0;i &lt; size - 1; i++)
  {
      arr2[i] = arr[9 - q]; //here I attempt to reverse arr1 and assign each element to arr2
      q++;
  }
  for (int j = 0; j &lt; size - 1; j++)
  {
     if (arr [j] != arr2[j])
     return false;
  }
     return true
  }
  </code></pre>