Scanf is not scanning %c character but skips the statement, why is that? [duplicate]
问题 This question already has answers here : scanf() leaves the new line char in the buffer (4 answers) Closed 8 months ago . I wrote a program using switch case statement and asked for a char for input but it does not ask for the char in the console window but skips it completely int main() { float a, b, ans; char opr; printf("\nGIVE THE VALUES OF THE TWO NUMBERS\n"); scanf(" %f %f",&a,&b); printf("\nGIVE THE REQUIRED OPERATOR\n"); //no display(echo) on the screen //opr = getch(); //displays on