Skip to content
Sign in
Computer

In C Language, the function getchar() _____?

Tap an option to check the answer. You can also press A–D.

Show answer

Correct answer: B) Requires pressing the "Enter" key after entering the character

In C, getchar() reads a single character from standard input but requires pressing "Enter" to submit the input. The input is buffered, meaning it waits for the newline (n) before processing the character.
Explanation
In C, getchar() reads a single character from standard input but requires pressing "Enter" to submit the input. The input is buffered, meaning it waits for the newline (n) before processing the character.