Maybe the input is obtained by reading into a string (e.g., using fgets) which is then parsed in various ways, e.g., by using sscanf.Originally Posted by EdMarx
Maybe the input is a command line argument, which perhaps might be a file name upon which further input is read from file.
Maybe the input is through a GUI.
Or, just maybe, scanf is used because its pitfalls are deemed not particularly relevant for the given piece of code. (That is, "never" is too strong a word.)
Once you have the required knowledge, yes.Originally Posted by EdMarx
Once you have the required knowledge, yes.Originally Posted by EdMarx
Why don't you ask him to explain why a GUI should not be done in C?Originally Posted by EdMarx
A GUI is certainly not the only possible user interface.Originally Posted by EdMarx
I am not sure what you mean by "usually all background programs" as it sounds like an oxymoron. Do you mean to ask if the usual use of C is to write "background programs", or if "background programs" are usually written in C?Originally Posted by EdMarx
For the former, I would say no, but then "usual" is ambiguous; for the latter, it depends on what you mean by "background programs".
No, but generally C is not the best programming language in which to develop a GUI.Originally Posted by EdMarx