In order to input any character, first you need to initialize it with "char" data type. Then using "scanf(%c)" the character can be taken as input.
There is one more way to take input i.e using "getchar()".
The way to get character as the input using char data type.
For example
#include<stdio.h>
int main
{
char a;//initialse the data type
scanf("%c",a)//getting the input from the user as a character
return o
}
In olden compliers like turbo c getchar is used.