I have a situation here
i am taking input from user
using scanf can I terminate the scanf as soon as user presses the # key
please enlighten me on this
See Question&Answers more detail:osI have a situation here
i am taking input from user
using scanf can I terminate the scanf as soon as user presses the # key
please enlighten me on this
See Question&Answers more detail:osNo, scanf()
(or rather stdin, by default) is line-oriented so it needs to read a full line.
Look into ncurses or similar libraries for "raw" key-by-key input.