> getche<CONIO.H> ~ Online tutorial

getche


  getche gets a character from console, and echoes to the screen

 Declaration:


   int getche(void);

 Remarks:
getche reads a single character from the keyboard and echoes it to the
current text window, using direct video or BIOS.

 Return Value:
Both functions return the character read from the keyboard.

program


#include <stdio.h>
#include <conio.h>

int main(void)
{
   char ch;

   printf("Input a character:");
   ch = getche();
   printf("\nYou input a '%c'\n", ch);
   return 0;
}

}

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: