Character Input functions
Character input functions
1. getch(): Use to input single character at a time. But it will not display input character.
get stands for input, ch stands for character.
Syntax: char a = getch();
2. getche(): It is same as getch() function but it will display input character.
get stands for input, ch stands for character, e stands for echo(display)
Syntax: char a = getche();
Both getch() and getche() functions will not required enter key to terminate.
3. getchar(): It will terminate by enter key after inputting a single character.
Syntax: char a = getchar();
Character output functions
1. putch(): It will print a single character
2. putchar(): print single character
Question on C Character:
- Input Character and display it.
- Print ASCII Value of input character.
- Print all characters and its ASCII value from 0 to 255.
- Find input character is in upper case, lower case or a digit.
- Find sum of 2 numbers and repeat the program until user exit.