title: My do while loop never ends, as I use strcmp in it
body: <p>I am making a morse code where when we enter a word or number or sentence etc, it gets turned into morse but I can't exit my do while loop.</p>
  
  <pre><code> printf("Enter anything you want to be translated to morse, if you want to listen to what exit sounds like and exit the program, type 'Exit'\n");
      do {
          fgets(Morse, sizeof Morse, stdin);
  
  
          for (int z = 0, length = strlen(Morse); z &lt; length; z++) {
              int n = 0;
              n++;
          }
          for (int i = 0, length = strlen(Morse); i &lt; length; i++)
  
  
              switch (Morse[i]) {
  </code></pre>
  
  <p>up line ends where my switch cases come in, in which I check which character it is and at the end of my do while loop, it ends like :</p>
  
  <pre><code>}
  
      }while(strcmp(Morse, "Exit") != 0);
      return 0;
  </code></pre>
  
  <p>but even when I type exit, it doesn't exit. What should I do?</p>