+ 3

What is the distinction between getch(), getchar(), getche()????

C challenge

9th Sep 2018, 5:43 PM
Sweet heart
Sweet heart - avatar
8 Réponses
+ 2
getchar() method is using the getter to grab a character aka primitive data. getch() is awaiting a character input from user. Usually this is used like a Delimiter in which the program exits after pressed. It is not printed. getche() awaits a character input from the user and prints it on screen.
9th Sep 2018, 5:55 PM
Apple Blossom
Apple Blossom - avatar
+ 1
ANTARICA
10th Sep 2018, 6:13 PM
Sweet heart
Sweet heart - avatar
0
just know that none of these should be used as they are all outdated
10th Sep 2018, 9:16 AM
hinanawi
hinanawi - avatar
0
Palak well getchar() is still usable technically and it's a shorter way to take a character input, but there isn't a lot of reason to use it instead of scanf("%c")
10th Sep 2018, 6:06 PM
hinanawi
hinanawi - avatar
0
Palak i've been coding for some 2-3 years now, wouldn't consider myself a pro however
10th Sep 2018, 6:10 PM
hinanawi
hinanawi - avatar
0
Palak it's mainly due to experience. i haven't done a lot of practical things yet other than developing a demo of a video game
10th Sep 2018, 6:11 PM
hinanawi
hinanawi - avatar
0
Palak in GML
10th Sep 2018, 6:12 PM
hinanawi
hinanawi - avatar
- 2
you suck palak
10th Sep 2018, 10:32 PM
Dayna Holmes
Dayna Holmes - avatar