void xyz()
{
    char input_new;
    printf("enter D or F:");
    scanf("%c",&input_new);
    switch(input_new)
    {
        case 'D':
            //Code
            break;
        case 'F':
            //code
            break;
    }
}
int main()
{
    char input;
    printf("enter A or B:");
    scanf("%c",&input);
    switch(input)
    {
        case 'A':
            xyz();
        break;
        case 'B':
            abc();
        break;
    }
    return 0;
}
why this code is unable to execute the switch case of function xyz(). it is getting terminated after printing "Enter D or F". Somebody please help me.
 
    