Friday 17 June 2011

Difference between getch( ) getche( ) and getchar( ) functions.

getch ( ) is used when you want to get a character from the user via keyboard. getch ( ) does not display the character pressed by the user from the keyboard. It returns ASCII Code of the character pressed by the user.
getche ( ) works same like getch ( ) except it displays the character pressed by the user. It returns ASCII Code of the character pressed by the user.
getchar ( ) works like getch ( ) and getche ( ) except it will continue inputting the character until Enter is pressed. It returns the ASCII Code of first character entered by the user

No comments:

Post a Comment