title: warning:return from incompatible pointer type (enabled by default)
body: <p>I coded a function. It gets 1 string and 1 character that entered. Character is start point and it prints as from this character. But my code gives 2 errors. Can you help me?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  char * mystrchr(const char * from, char c)
  {
      int i;
      for(i=0; from[i]!='\0'; i++)
          if(from[i]==c)
  
      return (const *)from+i;
  
  return 0;
  }
  
  int main()
  {
      char *a;
  
      a=mystrchr("asdfg","d" );
  
      printf("%s", a);
  
  return 0;
  }
  </code></pre>
  
  <p>Note: One of warnings doesn't fit on title. Therefore, I wrote there:</p>
  
  <p>Passing argument 2 of 'mystrchr' makes  integer from pointer without a cast [enabled by default]</p>