Use of getch(),getche() and getchar() functions in C

Use of getch(),getche(),getchar() functions in C



void main()

{

char ch;

printf("Please enter a character:");

ch=getch();

printf("\n\nEntered character is %c\n\n",ch);

printf("\n Please enter a character :");

ch=getche();

printf("\n\nEntered character is %c",ch);

printf("\nPlease enter a character and press enter key :");

ch=getchar();

printf("\n Entered character is %c",ch);

}//end of main function

Comments