title: What does 'y' in the output stand for in C?
body: <p>I have a problem, I construct a string in a loop and the output of that string to stout displays the string and a character 'y' with two dots above it as the last character.</p>
  
  <p>What is that? </p>
  
  <p>I create the string in this function:</p>
  
  <pre><code>char get_string(char *buf, int ble, FILE *fp, char del)
  {
      int i = 0;
      int c;
      char    result;
  
      memset(buf, 0, BUFLEN);
  
      do {
  
          c = fgetc(fp);
  
          if (c == del) {
              buf[i] = '\0';
              result = c;
              break;
          } else if(c == '\n') {
              buf[i] = '\0';
              result = '\n';
              break;
          } else {
              buf[i] = c;
              i++;
          }
  
      } while (c != EOF);
  
      return result;
  }
  </code></pre>
  
  <p>and then use the buf and result as follows in another function:</p>
  
  <pre><code>char    pair[BUFLEN];
  char    end;
  
  do {
  
          end = get_string(pair, BUFLEN, fp, ';');
          printf("Result: %s\n",pair);
  
  } while (pair != NULL);
  </code></pre>
  
  <p>The last iteration of the above Prints out "Result: y" I have no idea why.</p>