5
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 06 May 2026
5 points (100.0% liked)
C Programming Language
1303 readers
1 users here now
Welcome to the C community!
C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.
- irc: #c
๐ https://en.cppreference.com/w/c
founded 2 years ago
MODERATORS
man scanf:man getchar:There are a lot of inconsistencies with C functions, so important to check the man pages so you can handle them correctly.
Your call to getchar isn't quite correct either, pressing the
1key would print out 49, which is the ASCII codepoint for the1char.Ah, forgot about those. Thanks! On Linux, I read man pages all the time. Need adopt that same rutine.
Regarding
getchar()returning the ASCII code of the input, I commented this is the OP: