Overview :

This function is used to get character from the user.

Syntax :
int getch();
Description :
  • getch is used to get the character from the user.
  • getch does not echo character to the console.

"getch" function return a character.
Example :

void main()
  char a;
  printf("\nPress any key : ");
  a = getch();
  printf("\nYou entered %c",a);


Press any key : 
You entered d 



comments powered by Disqus