I am trying to getting an value in variable c which has an data type of character but it not ask me or wait me to enter the character
I have used fflush(stdin); this to flushing previous value if any but it wont work for me
int main()
{
int a =10;
float f;
double d;
char c ;
scanf("%d",&a);
printf("%d \n",a);
scanf("%f",&f);
printf("%f \n",f);
scanf("%lf",&d);
printf("%lf \n",d);
fflush(stdin);
scanf("%c",&c);
printf("%c \n",c);
return 0;
}
Here is what my output looks like