Search code examples
cgetchar

Question about getchar() in C?


I am learning and reading a C book. In the book, they say: "getchar() retrieves a single character from the standard input stream buffer without translating the input. "

I do not understand what the author mean by saying "without translating the input". I have tried googling, bu no luck.

Thanks.


Solution

  • Perhaps the author means that, characters are read as characters and not converted to some other data types. For example, if you used scanf("%d"), sequence of digits will be converted to an integer value.