-->

program to input and display single character



// program to input single character and display it
#include<stdio.h>
#include<conio.h>
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)
getch();
}

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