Provides a space before %c conversion specifier so that compiler will ignore white spaces. The program may be written as below:
#include
#include
int main()
{
char ch;
printf("Enter one char");
scanf(" %c", &ch); /*Space is given before %c*/
printf("%c\n",ch);
return 0;
}