title: Unhandled exception thrown: read access violation
body: <p>I was doing an assignment for my C class in school and I hit a little snag.</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  char stringToUpper(char * sName )
  {
      while(*sName != '\0')
      {
          stringToUpper (* sName);
          ++* sName;
      }
  }
  
  int main()
  {
      char str[50];
      char * sName;
      printf(&quot;Please enter your name &quot;);
      scanf(&quot;%s&quot;, str);
      printf(&quot;Hello %s &quot;, str);
      sName = str;
      stringToUpper(sName);
      printf(&quot;Name in uppercase: %s &quot;, sName);
  }
  </code></pre>
  <p>I tried looking for other solutions already, however I found that everyone else's problems were much more advanced than the level I'm at and really just couldn't follow it. I've still a little new at working with pointers and still a little confused about how they work (only a few weeks into the class) so I feel like the issue has something to do with that. I'm almost certain that the issue has something to do with the while statement.</p>
  <p>This is the error I get:</p>
  <blockquote>
  <p>Unhandled exception thrown: read access violation.</p>
  <p>sName was 0x41.</p>
  <p>If there is a handler for this exception, the program may be safely continued.</p>
  </blockquote>
  <p>Thanks in advanced for whatever help I receive.</p>