getche() nd getchar()

Home Forums C Programming getche() nd getchar()

Viewing 1 reply thread
  • Author
    Posts
    • #1934
      intvquestion
      Participant

      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

    • #3183
      Anonymous
      Inactive

      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.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.