- This topic has 1 reply, 2 voices, and was last updated 18 years, 9 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › getche() nd getchar()
why getche() returns the ascii value of newline character as 13 whereas getchar is able to return the correct ascii value of it ie 10
As far as i know, getche() function echos the character on the screen. and getchar() returns teh next character.
When u press Enter Button it returns ASCII value 10 and ASCII value 10 is the orignal n character.
And you know on the STDIO when u press enter button it means a n character.
This is my idea. Any one else migh have the correct answer.