C | Input and Output | Question 13
What is the return type of getchar()?
(A) int
(B) char
(C) unsigned char
(D) float
Answer: (A)
Explanation: The return type of getchar() is int to accommodate EOF which indicates failure:
Quiz of this Question
Recommended Posts:
- C | Input and Output | Question 13
- C | Input and Output | Question 4
- C | Input and Output | Question 5
- C | Input and Output | Question 6
- C | Input and Output | Question 11
- C | Input and Output | Question 8
- C | Input and Output | Question 12
- C | Input and Output | Question 13
- C | Input and Output | Question 9
- C | Input and Output | Question 13
- C | Input and Output | Question 2
- C | Input and Output | Question 3
- Basic Input and Output in C
- Input-output system calls in C | Create, Open, Close, Read, Write
- Output of C programs | Set 63



