Try this:
Code:
#include <stdio.h>
int main(int argc, char** argv)
{
char c;
int d;
printf("Enter a no:\n");
scanf("%d",&d);
printf("Enter a character\n");
getchar();
scanf("%c",&c);
printf("The number you entered is %d",d);
printf("The character you entered is %c",c);
getchar();
return 0;
}
I stuck a couple of getchars in it. Basically your first scanf takes a number but leaves the '\n' character from when you hit enter in the input buffer. The second scanf looks at the input buffer, sees the '\n' and takes it. The getchar basically just flushes it.