Second getchar function is not waiting for user input. Could not figure out what is missing in the following 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;
}
}