0
how to use getcharļ¼ļ¼ to avoid an enterļ¼
please help me ļ¼thanksļ¼
3 Answers
0
get char only takes one character you better use fgets
btw here is how you use getchar-
#include <stdio.h>
int main() {
char name;
puts("Enter your name");
name = getchar();
puts("Name entered: ");
putchar(name);
return 0;
}
0
If you need direct input I can recommend you "system ("/bin/stty raw"); " for linux systems or libraries like ncurses
0
ty guys so muchļ¼