title: c remove new line char help
body: <p>Im fairly new to c sorry if this is a stupid question!</p>
  
  <p>i have this:</p>
  
  <pre><code>  fgets(question,200,stdin);
    char *memq = malloc(sizeof(strlen(question)));
    memq= question;
  </code></pre>
  
  <p>however the question variable always has a new line on the end of it !
  how do i remove this / prevent it happening?</p>
  
  <p>i have tried this:</p>
  
  <pre><code>  fgets(question,200,stdin);
    char *memq = malloc(sizeof(strlen(question))-sizeof(char));
    memq= question;
  </code></pre>
  
  <p>there was no effect!</p>