Table of Contents

getche

char getche();

description of getche

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;
}

output of getchec example

   Enter a character : a
   The character was a