title: C Access violation writing location
body: <p>I just compiled this code, and it showed me this error:</p>
  
  <blockquote>
    <p>Exception thrown at 0x0F2FC4DA (ucrtbased.dll) in Sample7.exe: 0xC0000005: Access violation reading location 0x97979436. </p>
  </blockquote>
  
  <p>I literally have no idea what this error means as I've just been using C for a couple of months. I've also tried looking on any other websites to look for help, but I didn't find any.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;string.h&gt;
  #include&lt;stdlib.h&gt;
  int main()
  {
      int i = 0, n, length = 0;
      char *abc;
      printf("\n Enter size of array: ");
      scanf_s("%d", &amp;n);
      abc = new char[n];
      printf("\n Enter symbols: ");
      scanf_s("%s", abc);
      length = strlen(abc);
      for (i = 0; i &lt;= n; i++)
      {
          printf("\n Your array: ", abc);
          while (length = 10)
          {
              if (abc[i] &gt;= 'A' &amp;&amp; abc[i] &lt;= 'Z')
              {
                  abc[i] = ' ';
  
              }
              printf("\n Your array after deleting A-Z symbols",abc);
          }
  
      }
      delete[]abc;
      _getch();
      return 0;
  </code></pre>