program to input and display single character

// program to input single character and display it
void main()
char a;
printf(“enter a single character\n”);
scanf(“%c”,&a); // we can also use a=getchar()
printf(“the character=%c\n”,a); // we can also use putchar(a)

getchar() function is only used to input a single character and
putchar() is only for one character display