getchar is not waiting for user input
<p>Second getchar function is not waiting for user input. Could not figure out what is missing in the following code</p>

<pre><code>char ch = 'n';
bool status = false;

printf("%s", "Some text1\n");
ch = getchar();

if ((ch == 'Y') || (ch == 'y'))
{
    status = true;
}

if(status)
{
    printf("%s", "Some text2\n");
    ch = getchar();

    if ((ch == 'Y') || (ch == 'y'))
    {
        status = eNoError;
    }
}
</code></pre>