What is the difference between getch() and getchar()?

后端 未结 4 1505
北海茫月
北海茫月 2020-11-28 09:47

What is the exact difference between the getch and getchar functions?

4条回答
  •  孤独总比滥情好
    2020-11-28 10:29

    getchar() is a standard function that gets a character from the stdin.

    getch() is non-standard. It gets a character from the keyboard (which may be different from stdin) and does not echo it.

提交回复
热议问题