Pushes a specified character back onto the input stream for the current screen
#include <nwconio.h>
int ungetch (
int charToPushBack);
(IN) Specifies the character to be pushed back to the console.
ungetch returns the character pushed back to the console if successful.
ungetch pushes the character specified by the charToPushBack parameter onto the input stream for the current screen. This character is returned by the next read from the console (by the getch or getche functions) and is detected by the kbhit function. Only the last character returned in this way is remembered.
ungetch clears the end-of-file indicator, unless the value of the charToPushBack parameter is EOF.
ungetch also pushes extended keystrokes. The following table lists extended keys and their " ungetch " values:
See scrhand.c.