I'm using the latest VS C++ express edition for a basic intro to c++ class that is largely focused on numerical applications. Anywho, for whatever reason, I'm getting strange behavior from scanf("%c",&whatever). The program is supposed to use switch to perform some operations on input integers, but way before I can get there, it has a problem -- the scanf("%c"... deal seems to automatically get bypassed and the program quits (press any key). What's strange is that if I switch the order of the scanf's, s.t. the scanf("%c"... comes before the %d scanf's, everything is fine. What am I missing here?
int num1,num2;
char o;
float rslt;
printf("Enter 1st integer: ");
scanf("%d",&num1);
printf("Enter 2nd integer: ");
scanf("%d",&num2);
printf("Choose operation <a,s,m,d>: ");
scanf("%c", &o);
printf("\n%c",o);