getchar():
1, the input will not take effect until you press "Enter".
2. Only one character is received, not a string.
3. You can assign a value to it or use it as part of an expression.
Such as char c = getchar ();
4, it and getche (), the latter does not have to press "Enter".
Let me give you another example:
# include & ltstdio.h & gt
Master ()
{
char c 1,C2;
c 1 = getchar();
C2 = getchar();
putchar(c 1);
putchar(C2);
//You can also use printf("%c%c ",c 1, c2);
}
I think you should understand a lot after reading it. .