Programming Reference/Librarys
Question & Answer
Q&A is closed
Reads a character from the keyboard and display it on the screen.
reads a single character from the keyboard, and there are direct or via a BIOS call made in the current text window.
#include<stdio.h> #include<conio.h> int main( void ) { printf("Enter a character : "); char ch; ch = getche(); printf("The character was %c",ch); return 0; }
Enter a character : a The character was a