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.
More Related Contents:
- How can one flush input stream in C?
- how to enter a function to a file in c
- ‘ ‘, ‘\n’ , scanf() and output screen
- How to work with a variable number of variables in C?
- Why does pow(n,2) return 24 when n=5, with my compiler and OS?
- How to prevent SIGPIPEs (or handle them properly)
- How to read a line from the console in C?
- What are the rules of automatic stdout buffer flushing in C?
- Code for printf function in C [duplicate]
- What’s the correct way to use printf to print a clock_t?
- How do you do non-blocking console I/O on Linux in C?
- Reading a line using scanf() not good?
- What’s the best way to return a random line in a text file using C?
- What will happen if ‘&’ is not put in a ‘scanf’ statement?
- Is there a Windows equivalent to fdopen for HANDLEs?
- How can you flush a write using a file descriptor?
- C equivalent to fstream’s peek
- plain C: opening a directory with fopen()
- Why does forking my process cause the file to be read infinitely
- What is the correct printf specifier for printing pid_t
- Unable to open a file with fopen()
- whitespace in the format string (scanf)
- Why does this code print two times? [duplicate]
- Does stdlib’s rand() always give the same sequence?
- Reading a file character by character in C
- Return value of fgets()
- ftell at a position past 2GB
- Tried and true simple file copying code in C?
- ungetc: number of bytes of pushback
- Is close/fclose on stdin guaranteed to be correct?