What’s the best way to get user input in a C program where the choices are of a limited number?
Say for example the choices are:
A) Print the list. B) Add 99 to the end of the list. C) Delete all duplicates. 5) Reset 5 times.
Entering "A" and then Enter is OK. Or, just a single keystroke would work as well.
getchar(), orcgetc(), depending on the platform