<p>I have a const char arr[] parameter that I am trying to iterate over,</p>

<pre><code>char *ptr;
for (ptr= arr; *ptr!= '\0'; ptr++) 
  /* some code*/
</code></pre>

<p>I get an error: assignment discards qualifiers from pointer target type</p>

<p>Are const char [] handled differently than non-const?</p>

Switch the declaration of *ptr to be.
```
```
const char* ptr;
```
```
The problem is you are essentially assigning a const char* to a char*.  This is a violation of const since you're going from a const to a non-const.