I am having problem scanning char variable , my code is
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int a;
float b;
char c;
printf("Enter value for int variable \n");
scanf("%d",&a);
printf("Enter value for float variable \n");
scanf("%f",&b);
printf("Enter value for char variable \n");
scanf("%c",&c); //scanning is automatically skipped !!!
getch();
}
Please tell me , why is this happening and what can i do to solve it !