title: Find substring in a string
body: <p>Here is my code to find substring entered by the user in the given string. </p>
  
  <pre><code>bool find_str(char *str, char const *substr) {
      while(*str) {
          if(*str++ == *substr) {
              char const *a = substr;
              while((*str++ == *++a));  /*empty*/
              if(*a == '\0')
                  return true;
          }
      }
      return false;
  }
  // If match found, then return true, else false
  
  int main(void) {
    printf("%d", find_str("ABCDEF", "CDE"));  /* Return true in this case */
    printf("%d", find_str("ABCDE", "CDE")); /* Return false in this case */
  
  }
  </code></pre>
  
  <p>As explained in the comment, it returns true whenever it ends with an additional characters. If it is not, then it returns false. I think there is a problem in increment/decrement operator. But I could not find how?</p>