Reading and checking Character Problem
<p>This is my code</p>

<pre><code>#include&lt;stdio.h&gt;

int main()
{

    char choice;

    printf("Do you want to enter a number:");
    scanf("%c",&amp;choice);

    while(choice == 'y')
    {
      printf("Entered number\n");
      printf("Do you want to enter a number:");
      scanf("%c",&amp;choice);


    }

    printf("End\n");

return 0;
}
</code></pre>

<p>and the output was</p>

<pre><code>Do you want to enter a number:y
Entered number
Do you want to enter a number:End
</code></pre>

<p>for the first time, it checked whether my character is 'y' but in the loop after first time execution, it doesnot wait for user to type, it just terminates the loop . what might have gone wrong ?  please help</p>
