title: Printing the value of a char array
body: <p>I'm trying to write a function that takes in a <code>const char*</code> and iterates through it until it matches the first character of the <code>const char* hello</code>. It then prints the amount of characters it had to advance and the <code>mth</code> character. As of now, I have gotten it to point to where I want to, but I can't seem to access it</p>
  
  <pre><code>const char* hello = "hello";
  const char* no_bears = "ERROR:  Message must contain 'THIS IS BEAR TERRITORY!' yeeee";
  
  int is_commit_msg_ok(const char* msg) {
    /* COMPLETE THE REST */
    int m = 0;
    char* message = &amp;msg[0];
    while (message[m] != hello[0]) {
      if (message[m] == '\0') {
          return 0;
      }
      m++;
  
    }
    printf("%d\n",m );
    printf("%s\n", message[m]); \\ causes segmentation fault
  </code></pre>
  
  <p>When I do message[m], however, I get a segementation fault: 11 error, and I don't really know how to fix this...</p>