Hello everyone,

there seem to be a lot of questions on this board regarding the correct use of scanf(), most of which advert to a weak understanding of pointers.

Personally, I haven't been using scanf() since I passed the initial 20 pages of my first book on C about ten years ago. Since then, I've always been using a (possibly dynamic) array to read data one character at a time and then check the input using isdigit(), atoi(), strtod(), whatever.

I think the underlying problem with scanf() is that it frequently appears early in the literature, way before the infamous chapter about pointers. At this point, the reader isn't familiar with the concept of a variable as the 4-tupel consisting of name, value, address and size and thus must regard the &-operator as some magic that is required to get scanf() to work as intended.


What's your opinion about the usefulness of scanf()?
Are you actually using it on a frequent basis?

Greets,
Philip