answersLogoWhite

0

gets()

Reads characters from stdin and stores them as a string into str until a newline character ('\n') or the End-of-File is reached.

The ending newline character ('\n') is not included in the string.

getchar()

Returns the next character from the standard input (stdin).

It is equivalent to getc with stdin as its argument. === ===

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
JudyJudy
Simplicity is my specialty.
Chat with Judy
More answers

basically getchar is for inputting a single character and it returns a value (character)

and scanf is used for many values like int,float etc

besides that getchar is an unformatted function maens it does not make use of format specifiers where as scanf is a formatted function.

User Avatar

Wiki User

12y ago
User Avatar

getc() is used to read a character from a file while getchar is used to read character

from keyboard(stdin i/o routine)

User Avatar

Wiki User

14y ago
User Avatar

gets() accepts a string until Enter key is hit..

User Avatar

Wiki User

12y ago
User Avatar

Read a character from stdin. It can be a macro:
#define getchar() getc(stdin)

User Avatar

Wiki User

15y ago
User Avatar

The getchar is used when you are getting a single character from the user. The putchar is used to show one character at a time as output on the standard device.

User Avatar

Wiki User

10y ago
User Avatar

getchar() is used in c language.

getchare() is not used in c language.

More specifically to say there is no function in c named getchare().

User Avatar

Wiki User

12y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What is the use of getchar?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering