Open In App

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

Article Tags :