Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the difference between getc(), getchar(), getch() and getche().
Home
C Plus Plus
What is the difference between getc(), getchar(), getch() and getche().
0
votes
asked
Jan 12
in
C Plus Plus
by
GeorgeBell
What is the difference between getc(), getchar(), getch() and getche().
c-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 12
by
GeorgeBell
getc():
The function reads a single character from an input stream and returns an integer value (typically the ASCII value of the character) if it succeeds. On failure, it returns the EOF.
getchar():
Unlike getc(), gechar() can read from standard input; it is equivalent to getc(stdin).
getch():
It is a nonstandard function and is present in ‘conio.h’ header file which is mostly used by MS-DOS compilers like Turbo C.
getche():
It reads a single character from the keyboard and displays it immediately on the output screen without waiting for enter key.
Related questions
0
votes
Q: What is the difference between macro and functions?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between type casting and type conversion?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between the local and global variables in C?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between near, far and huge pointers?
asked
Jan 9
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between including the header file with-in angular braces < > and double quotes ” “?
asked
Jan 9
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between goto and long jmp( ) and setjmp()?
asked
Jan 9
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between ‘g’ and “g” in C?
asked
Jan 6
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between #include "..." and #include <...>?
asked
Jan 6
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: Difference between const char* p and char const* p?
asked
Jan 4
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between global int and static int declaration?
asked
Jan 4
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
...