getc, getch, getche and getchar in C

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I should have learned all this 4 years ago! All those times i've been using scanf for character input lol.

jmfbv
Автор

thanks for the help. and i wanted to ask if there is a function like 'getch' to use across the platform like linux

vasusubbannavar
Автор

why char cannot store -1?(i.e. EOF)
signed char has from -128 to + 127. Enough for all the ascii codes and -1 as well.
Thanks in advance, love ur videos and ur channel. A gem.

jalalbounaim
Автор

I'm in C++ but you've helped me a lot! Thanks!

filiperubin
Автор

Hey I hope you are doing well .
I am on Linux and getch() does not work . I am writing a program that specifically works on the principle that the user enters the character but is not allowed to see the input he gives .

How do I write my own getch() or do you know if there is a substitute for it in the std. c library?

mb
Автор

that debug hack was the real reason i was here, thanks

HK-swvi
Автор

Thanks. What does it mean that 'getch' can be used as an macro?

artukiwi
Автор

Kbhit() and getch() alternatives for other os which not supports <conio.h> ?

SidsAnalysis
Автор

Can you do a video on the EOF macros? I am stuck on a program in teh ansi c book and cant find valid info on it on youtube.

susqibi
Автор

do i have to enter (stdin)??? if i don't... won't the getc func work??

ZahinAbdullah
Автор

Thanks for this helpful video. I have a question. Are there any alternatives available if we need to take a single character input from the user without storing it in the buffer (ie. without the need to press the enter key) but also following the standard norms?

indibarsarkar